Before you consider moving your WordPress site we do thoroughly recommend BackupBuddy to substantially ease and automate the transfer process. If you’ve already transferred your site then don’t worry as help is still at hand.
So what’s happened?
References to your old site are still present in your WordPress setup and they are referencing back to your old site. This can include internal (admin) and external links and also your media library file references.
What do I need to do?
You need to update those erroneous references and we recommend the following steps:-
1. Open up your site wp-config.php file and look for:-
Make sure that ‘your-site-name.com’ matches your domain or localhost and if not then change it
2. Update all the references in your WordPress database to the old site
You can run SQL Queries but as we have WordPress we might as well use a plugin to do everything for you. You can use the BackupBuddy server tool find and replace, but we also recommend the following free plugin to do the job – ‘Better Search Replace‘.
- Backup your site database (again you can use BackupBuddy or an alternative backup plugin)
- Activate ‘Search and Replace’ and then go to Tools / Search & Replace
- In ‘Global Search & Replace’ Search for “your-old-site-name.com” and Replace with “your-new-site-name.com”
- Click ‘Go”
And that’s it all references to the old site are updated with the new address.