There are times when you need to move your website from one address to another, a simple html website can be just downloaded by a ftp client and uploaded to the new hosting place and that’s that… But when it comes to WordPress site you have to take a few extra steps to get the job done. Here is how to change the website address in WordPress.
First of all you should know how to backup a WordPress site, if you don’t then check out this link before continuing.
You should also know how to restore WordPress site, if you don’t then check out this link before continuing.
After you have moved your website to a new address you need to make some changes in configuration and database files so that the WordPress knows where to operate the site from. If you don’t make these changes you will see that when you enter the new website address (e.g. newaddress.com) your site will automatically try to load from the older address (e.g. oldaddress.com) and that will cause an error if there is nothing there.
Here is a step by step guide of how to change the website address in WordPress.
Using CPanel File Manager
Using CPanel access File Manager and edit wp-config.php as shown in the images below
Add the following 2 lines in the php file (replace example.com with you new site address)
Login to your wp-admin page a few times and your website will start running in a few minutes.
Some times the above mentioned approach does not work in such case use the following alternate method
Click on phpMyAdmin as shown below
Select your database on the left pane and you will have the following view
click on edit and change the website address as shown below
that’s it all pages will start loading properly now..
Regardless of which ever process solves your problem, these approach only works on WordPress generated links any links hard coded by you will still need to be updated manually.
Have fun 🙂