I need to repair all the URLs in a WordPress site. The problem is that the site domain was bought after the hosting plan. The hosting assigned a static IP and the site was mounted using that IP. Now I need to update over 700 links in the database from http://xxx.xxx.xx.xx/~blah/ to http://www.example.com. Is there an easy way to do it? I already checked and most of those links are in the guid column in the wp_posts table. I have access both to the wp-admin and phpmyadmin in c-panel so, any solution would be nice.
Share
That known problem has a pretty easy bypass.
Just download that great tool right here
https://launchpad.net/mysql-search-replace, put the extracted folder in you serverץGo in your browser to the mysql-replace.php file that inside the tool’s folder.
Then, write your old ip address in the search field and your new domain in the replace field.
Fill in your hostname, database name, username and password, click on the replace button, and that’s it! All the places that your IP is written in your DB will be replaced with the new domain!
I suggest to do a search before the replacing, to ensure that you’ll replace the right query and not ruin your DB by mistake.