How can WordPress modify the links of articles and pictures in batches after moving?

2 minutes
seven hundred and twenty-three
one

When many webmasters use WordPress to build a site, they will encounter the situation that the pictures in the article cannot be accessed or displayed after changing the domain name or moving; At this time, you need to batch replace the article images. This article summarizes the process of batch replacement of article images, hoping to help you.

Image link failure analysis

1. Changed the domain name of the site: Many webmasters chose the domain name at random in the early stage of building the site. They wanted to change a new domain name after operating for a period of time and getting results. At this time, after changing the domain name, they found that the picture in the article was still the previous link path. Once the previous domain name resolution was closed, the picture could not be displayed.

2. Map bed address or cloud storage is used: the resolution of the external domain name of the map bed or cloud storage fails or is replaced due to some reasons, which will make the original published article images cannot be displayed.

3. Other reasons The picture address is invalid In the above three cases, if you want to change the picture link address of an article, you do not modify it in batches. By manually modifying it, unless there are only ten or eight articles, it does not matter. Otherwise, it will be difficult to update the picture address.

Batch replacement using database commands

The following shows how to use the phpMyAdmin Operation, other environments shall be subject to the actual situation.

1. It is preferred to enter the corresponding database and click the left side to select wp_posts data sheet.

 two

2. Then click on the right SQL Select to execute the replacement command.

 /** *Modify the old domain name and the new domain name according to your domain name */ UPDATE wp_posts SET post_content=REPLACE (post_content, 'old domain name', 'new domain name');
 three

The execution is successful.

Other situations

The above method mainly solves the problem of article pictures not being displayed. In some cases, some pictures on other pages will not be displayed. You need to check other tables for replacement and modification, for example: wp_options wp_postmeta Etc.

This article is written by: Shallow singing Published on Software Development of Little Turkey , please indicate the source for reprinting: //hongchengtech.cn/blog/404.html
Shallow singing
author

Related recommendations

1 year ago (2024-02-20)

Industry Fit! Preferred element of WMS warehouse management system, wms warehouse software

Enterprise managers often think that warehouses are inefficient, high cost places, and belong to heavy asset operations. With the development of enterprise business, if the warehouse needs to be expanded in traditional ways, the cost is relatively high. At the same time, it also faces problems such as lack of operating experience. In the operation link, the process of warehouse, allocation, human resource matching and management is very complicated, and the team's professional ability is also highly required
seven hundred and eighty-three
zero
1 year ago (2024-02-19)

Supply chain billing system management (I): system overview, what are the supply chain management fees

In recent years, with the continuous development of e-commerce industry and increasing business, everyone has started to distribute goods online, and the supply chain billing system needs to manage more and more things. How to manage the billing system? The author summarizes some contents about settlement based on his own practical experience, hoping to enlighten you. After working on the warehouse management system for several years, I was transferred to work as a supplier
five hundred and fifty-four
zero
1 year ago (2024-02-19)

Multi merchant system management - store background design, what is the meaning of multi merchant classification

Simply understood, multi merchants are a large mall. The platform can manage merchants who settle in the mall. The merchants who settle in the mall have independent backstage. They can log in and add goods to the shelves by themselves, manage stores by themselves and other information functions. Then how to design the backstage of the store? Let's see the author's sharing. I hope it can help you. 1、 Introduction The backstage of the store is an important part of the e-commerce platform
six hundred and forty-six
zero
1 year ago (2024-02-19)

Jiangyang District of Luzhou City took the lead in the city's full coverage training on domestic waste classification management regulations, Luzhou waste treatment

Source: Original Draft On January 10, the People's Congress of Jiangyang District, Luzhou City and the District Government jointly carried out a training on the regulations of the Regulations on the Classified Management of Domestic Waste in Luzhou City (the Regulations for short), and invited Lei Zhengyun, the chairman of the Legislative Affairs Committee of the Municipal People's Congress, to give a live lecture, so as to guide the comprehensive and systematic grasp of the contents and legal functions and responsibilities of the Regulations, deeply understand the specific specifications of the Regulations, and quickly set off
three hundred and seventeen
zero
1 year ago (2024-02-19)

Simeng CMS (smcms) content management system, Simeng Central Primary School

SMCMS (Simon CMS) is a content management system developed based on the microbee http rapid development framework. Product development follows the concept of simplicity, security, high concurrency and efficiency. Enterprise level web content management software for high-end users is designed to help users solve the increasingly complex and important web content creation, maintenance, publishing and response
three hundred and sixty-one
zero
1 year ago (2024-02-19)

Does the website have to install a content management system?, What apps are needed to install software on the website

1: The role of the website is to let companies or enterprises display their own windows, but also to let more customers or potential customers know their work and products. Through the website, customers can understand their products and services more intuitively, and can also provide more services to meet customer needs. 2: The role of the content management system The content management system can help
four hundred and fifty-five
zero

comment

0 people have participated in the review

Scan code to add WeChat

contact us

WeChat: Kuzhuti
Online consultation: