How to Make Changes of Image Links after a WordPress Migration

How to Make Changes of Image Links after a WordPress Migration

URLS images are coded in a different way. Due to that reason changing of the site URL will not fix and update them. In this article we will look how to make changes of image links by using your phpMyAdmin tool.
Please note that the following steps aren’t mandatory. But if your domain name will change during the migration, you can use them.


Correcting image links after a migration

1. First, go to your cPanel.

2. Find the Databases category and choose the phpMyAdmin tool icon.


 
3. Now, from the main phpMyAdmin page, search for the newly added database in the left-hand sidebar.

4. The screen will be refreshed and a list of the tables will be shown. Then, choose the wp-posts table.

5. There are several tabs on the top of the screen - click on the SQL tab.

6. Please, copy the following code on a MySQL editor screen:

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

Note: You should replace <old_url> with the old name of the site and <new_url> with the new name of your site.

Press the Go button to run the code. Take in mind that “hard coded” links will be affected, too.









Was this article helpful?

mood_bad Dislike 92
mood Like 92
visibility Views: 2562