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.


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


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


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


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>’));


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 the new site URL.


If you need any further help you can Hire our Expert.

Was this answer helpful? 0 Users Found This Useful (0 Votes)