How to Correct Image Links After WordPress Migration

Last modified: July 31, 2020
You are here:
Estimated reading time: 1 min

In this documentation, we can learn how to correct image links after migrating WordPress sites. After migrating a WordPress website, we need to update the URLS for images within your pages and posts. If you simply change the site url, it will not fix this problem

1) Login to your cPanel interface.

2) Select the icon ‘phpMyAdmin’ under the ‘Database’ category.

Image Links

 

3) After selecting phpMyAdmin page, find your newly added database, and click on the database.

Image Links

 

4) It shows all the tables inside the database. Find the table ‘wp-posts’ from the list of tables.

Image Links

 

5) Click on ‘SQL’ tab from the top of the screen.

Image Links

 

6) Now it displays a MySQL editor screen. Copy the following query to the code area.

UPDATE wp_posts SET post_content=(REPLACE (post_content, ‘<old url>’,'<new url>’));

Image Links

 

Please be sure to replace <old url> the old site name and <new url> with the new site name.

Then click on the ‘GO’ button to run the code. After the code has been run, all posts and images will be updated with new site URL.

 

If you need any further help please contact our support department.

 

Was this article helpful?
Dislike 0
Views: 10