Sometimes you may need to migrate your WordPress website or want to move your WordPress website to a new location. If you simply move your files or database, your website will not going to work properly. The reason behind its malfunctioning is that WordPress completely relies on URL settings.
Another advantage of changing the URL of your WordPress website is that it helps you to practice on the new website without affecting your primary website. With the following mentioned steps you can simply test the installed WordPress in another location or in another sub-domain folder.
Before you start this process, I recommend you to make sure to create the backup of your WordPress website or WordPress database so that if any changes create complications you can easily restore from the backup you had created.
To change the WordPress website URL you need to first know about the main two settings of WordPress Address (URL) and Site Address (URL).
1) WordPress Address (URL):- WordPress Adress is the URL which help your browser to reach at your WordPress blog.
2) Site Address (URL):- The Site Address is the URL which specify the path where the WordPress core files are locate.
Now I am going to list some of the methods with which you can easily change the WordPress URL of your WordPress website:
You can easily change the WordPress site and address url by following any of the method. I am now explaining all the above methods one by one with which you can easily make the changes.
You can change the the URL of WordPress website directly from the Dashboard. This method will only work if you have installed the WordPress on that location & then you can easily access it without any issues.
Step 1. First of all you need to login into the WordPress Admin Panel.
Step 2. Now you need to navigate to left side of navigation bar and click on the Settings >> General.
Step 3. After clicking on the General, you can fill the WordPress Address and Site Address (URL) as per your requirement as shown in the below picture.
The easiest way to change the wordpress or website URL is through the wp-config file. This method is very useful if you want to check whether the new wordpress website or test wordpress is working or not.
Step 1. First of all you need to Login to cPanel.
Step 2. Scroll down to Files section and click on File Manager icon.
Step 3. Now to need to navigate to wp-config.php file in the public_html folder of your hosting account.
Step 4. To edit the wp-config.php file you need to Right Click on the wp-config.php file and click on the Edit button.
Step 5. In wp-config.php file, add the below lines after the initiate code of the php to change the website URL location, you need to add both the lines given below in your wp-config.php file, where “example.com” is the location of your website or your domain name.
You can also change the wordpress URL directly from the wordpress database using the phpmyadmin tool.
Step 1) First of all before making any changes in your database, I will recommend you to create the backup of your website database in cPanel.
Step 2) After taking the backup, you need to scroll down to Databases section and click on phpMyAdmin icon.
Step 3) Now you need to select your WordPress database from the left side of the panel.
Note: In case you don’t know how to find the WordPress database name then you can also check WordPress database by taking help from our guide.
Step 4) You will get the list of tables with the prefix “wp_” and then select the wp_options table and also it may be different in your database as it is depend upon your installed settings .
Step 5) Click on the Edit in the front of site url or home entries to modify the location where the website is already installed.
Step 6) Now you can enter new values under the “option_value” and hit the “Go” button to save the settings.
I hope you are able to update the new URL in your WordPress website after moving WordPress from one server to another.
You can also read our more guides related to WordPress. You can contact our support team or chat support team if you are facing any issue while making these changes.
You can like our facebook page for more exciting offer and our new tutorials related to various issues of WordPress.