HOW TO: Configure WordPress to work with a new domain
Posted by on 27 August 2018 05:35 PM
If you want to use WordPress on a new domain all you need to do is change the siteurl and home options in our WordPress Dashboard or via FTP.
Using the WordPress Dashboard
To do this go to Settings > General and replace WordPress Address and Site Address with the new domain name you want to use.
If you have access to the site via FTP, then these methods will help you quickly get a site back up and running if you changed those values incorrectly in the Dashboard.
It is possible to set the site URL manually in the wp-config.php file.
Add these two lines to your wp-config.php, where “example.com” is the correct location of your site.
This is not necessarily the best fix, it’s just hardcoding the values into the site itself. You won’t be able to edit them on the general settings page anymore when using this method.