How to Update Your WordPress Website to a New Domain
Follow these steps to update your WordPress website to a new domain:
Before you start – please ensure that you retain a backup copy of your website files.
1. Log in to your WordPress Admin/Backend portal. To do this, open up a web browser then type in yourdomain.com/wp-admin or yourdomain.com/wp-login.php into the address bar.
2. Once you have logged in, go to the left-hand side panel, then click Plugins.
3. On the Plugins page, click Add New.
4. Enter ‘better search and replace’ in the search bar.
5. Look for the ‘Better Search Replace’ plugin by Delicious Brains, then click Install Now.
6. Once the plugin has been installed, click Activate.
7. When the plugin has been activated, go to the left-hand side panel, then click Tools, then click Better Search Replace from the dropdown menu.
Updating your website to the new domain using Better Search Replace
Search for – Enter your website’s current domain name.
Explanation: This will search for the text within all your database tables. In this scenario, we want to search for the current/existing domain name.
Replace with – Enter your website’s new domain name.
Explanation: This will replace the text within all your database tables from the text that was searched for in the previous section. In this scenario, we want to replace the old domain name with the new domain name.
Select tables – Highlight all the tables listed.
Explanation: The search and replace function will only apply to the tables highlighted. In this scenario, we want to replace all of the domains on our website that relate to the old name with the new name.
Run as dry run? – Ensure this is ticked.
Explanation: This will run the Search and Replace as a trial run. It will identify how many changes will be made on the tables, without making the changes. Once everything is verified, you can rerun the Search and Replace without this ticked to perform the changes.
Run Search/Replace – Click this button once all fields are completed.
Explanation: This button runs the Search and Replace command on the tables selected.