Here is the best way to change a domain name in your WordPress Installation. As always, before you make any changes it is recommended that you complete a full backup of your site prior.
Change in WordPress
Log into your WordPress Dashboard, go to Settings > General. Change both the WordPress Address and Site Address to your new domain name, then save.
Update wp-config.php
What is the wp-config.php? This is a crucial file in your WordPress installation that contains important data and configuration information from your website.
To access and update this with your new domain, you’ll need to find your FTP credentials or log into cPanel and access your File Manager. Once you have access to the FTP/File Manager, go to public_html > wp-config.php, then right-click the file and select Edit. What you will see is:
- define(‘WP_HOME’,’http://
yoursitename.com‘); - define(‘WP_SITEURL’,’http://
yoursitename.com‘); - Change ‘your site name’ to the new domain name, then save.
Update your WordPress Database
Go to your control panel (https://domain.com/cpanel) and use the search tool to locate phpMyAdmin. Find wp_options, then type your new domain into ‘siteurl’ and ‘home’. Click Go to save.
If the above seems complicated, there are also many plugins to accomplish a domain change which may work better for you.
- Duplicator – https://wordpress.org/plugins/
duplicator/ - Redirection – https://wordpress.org/plugins/
redirection/ - Backup Guard – https://wordpress.org/plugins/
backup/
How to get additional support for WordPress
We provide support for the basic installation on the server, not the actual WordPress software, however we recommend using the WordPress forums for support as they offer a lot of great information.
Here is the link to WordPress Support Forums https://wordpress.org/support/