0

I am sure someone has answered this but I have not found a definitive answer. I have a site that I moved from one site with an old domain to a new host with an new domain. I changed the site URL in the Wordpress admin already and that did not seem to change text links in the page content blocks in paragraphs.

I am seeing in some pages where links were linked in some of the text content in the pages pointing to other pages and documents within the site that the links are pointing to the old site domain. Where should this be changed or can it be changed without having to go through every page and changing the links manually. I have no problems doing MySql SQL if anyone can provide any suggestions.

1

The easiest option would be to install a plugin called better search replace, this will only work for the database. You can then search the database for instances of x and replace with y - x obviously being the URL on the old site and y being the URL of the new website. Be sure to back up the website before doing any of this.

You can also string locator to find any instances of the URL that are hardcoded in to the theme itself.

For future reference, if you want to very easily migrate a website from one website to another, use a plugin called All in One WP Migration, it's free up to 500mb. It will automatically change all URL references in the database from the site it was exported on, to the new site that the AIOWP file was imported to.

  • I always express caution with plugins like this. They can timeout etc. This is why I do the work OUTSIDE of the WordPress installation. – rudtek Nov 16 '17 at 1:27
0

The wordpress database is still holding some data (post content, image urls etc) in it's database.

You need to go into your database and change the url references to the new domain as well. I suggest NOT doing this through phpmyadmin though as it will cause some problems.

Go get this tool: https://interconnectit.com/products/search-and-replace-for-wordpress-databases/

Upload it into your the contents of the zipped file into a new directory in your www/ folder. (I usually rename the search and replace folder to SRDB.) Now navigate to your site with the SRDB at the end. (www.example.com/SRDB)and the top two lines you'll see a search field and a replace field. (if you get a db connection error here, double check the wp-config to ensure that it has the right credentials).

In the search place your old site address: http://www.example.com in the replace field place your new url http://www.example2.com/ hit live live run. ONLY do this after ensuring you're on your new url and that it's loaded into your new database AND you've backed up your db just in case. This should fix your problems!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.