Sometimes, you may want to change the domain name of your WordPress site. For instance, in a case where you are running your site under a sub-domain but you want to move to a top level domain.
The entire process should not be complicated. This is a step-by-step guide that shows you how to completely change the domain name of your WordPress site without losing your site customization and settings.
Prerequisites
- A new domain name(e.g.www.example.com)
- A hosting account
- Access to the admin section of your WordPress site
Step 1: Update the DNS settings of the new domain name
Before you begin, backup your WordPress site. Then, make sure you have pointed the DNS records of the new domain name to the name servers of your hosting account. You can get these values from your hosting provider and they usually start with an ‘ns’ prefix.
For example:
ns1.example.com ns2.example.com
Remember, DNS server update may take up to 48 hours to propagate so it is good to plan early before time.
Then, you will need to add the new domain under the list of ‘Addon Domains’ on cPanel. If you are running your site from a VPS plan with no GUI (Graphical User Interface), you will need to create a new virtual host and reference your new domain name.
Step 2: Login to the admin section of your website
Next, login to your WordPress site using the old domain name. Assuming your old domain name is ‘example.com’, enter the URL below on a web browser.
www.example.com/wp-admin
Then, enter your username and password and click ‘Log In’ to proceed.
Step 3: Update the domain name from the WordPress General settings
Next, go to WordPress ‘Settings’ Menu and select ‘General’ sub-menu. Replace every instance of the old domain name with new values. For instance, if you are changing the domain name from ‘www.example.com’ to ’www.example.net’, enter the values below:
Then, click on ‘Save Changes’ at the bottom of the screen.
If you try to access your WordPress site using the new domain name, you will get a 404 – page not found error. You will have to move all files under the public_html directory of the old domain name to the new domain name.
You can do this using cPanel file manager.
Step 4: Update permalinks
Next, you need to update permalinks. This time, log in to the admin section of your WordPress site using the new domain name e.g.
$ www.example.org/wp-admin
Then locate ‘Settings->Permalinks’
Then click on ‘Save changes’ on the bottom end of the screen to refresh the URL’s
In case you see broken links on your site, you should install a ‘Search and Replace’ Plugin from the WordPress software repository.
Conclusion
In this article, we have taken you through the procedure of changing the domain name of your WordPress site. As advised above, you should plan earlier to avoid downtime on your site in case DNS propagation takes a long time to be refreshed. If you followed the step-by-step guide accurately, you can now serve your WordPress site from the new domain name.
Special Note: if don’t feel tech savvy enough to do this, it is worth considering specialized WordPress hosting plan that includes WP support. You can find the highest rated WordPress hosting providers on HostAdvice.
Check out these top 3 WordPress hosting services:
- Do you need the best wordpress hosting? Check out for our recommendations by clicking here.