Do you want to change the URL of your WordPress website?
If you have bought new domain names for your website or you want to transfer your website into HTTPS then you might need to change the URL of your site. It is easier to change URL than it sounds. With the right guide, even a beginner can do it without any difficulty.
In this tutorial, we’ll learn how to change the URL of WordPress websites.
There are few options that you can follow when it comes to changing URL. I have explained three different methods in detail.
Change WordPress URL via the Admin Dashboard
This is the easiest method to change the URL. First of all, you need to have access to the WordPress admin area.
Login to WordPress dashboard. Go to Settings>> General. You’ll see two fields called ‘site address’ and ‘WordPress Address’. Site address is the actual link of your website whereas WordPress address is for storing WordPress files and folders such as admin pages, media files, plugins. Enter your new URL in both fields. Then click on the save the changes button to implement it.
You can clear the cache of the website for better results.
Change WordPress URL in wp-config.php File
This method is only recommended if you are unsure which WordPress theme you need to edit or cannot find the functions.php file.
In this method, you need to add the site URL to the WordPress configuration file. In order to do that, located in the root folder of your website.
go to the root directory of your website using an FTP client. Then locate the wp-config file and open it in edit mode. Now, carefully add the following code just above the line that says ‘That’s all, stop editing! Happy publishing’.
define( 'WP_HOME', 'https://yourwebsiteurl.com' ); define( 'WP_SITEURL', 'https://yourwebsiteurl.com' );
Finally, save your changes. Now you can visit your website with the new URL.
Change WordPress Site URLs in Database
Changing the WordPress URL in database is another popular method. For this, you’ll require access to phpMyAdmin. You can easily use the phpMyAdmin tool through your host’s dashboard or cPanel.
Navigate to phpMyAdmin and select your site’s database from the left side. Then scroll down and locate the wp_options table on the database. If you can’t find it then try to find a table name that ends in “_options“ and click on it.
After doing that, you’ll be able to enter a new siteurl and home simply by clicking on edit. Enter the new site Url under the option_value field. Click Go button at the right corner to save them.
That’s all! Now you can visit your website with a new Url to check if it’s working or not. Remember, now your site can be only reached through the new URL. Also, changing Url causes a lot of broken link problem so don’t forget to fix that issue by using plugins such as Velvet Blues Update URLs.
You can also change the URL of the login page of WordPress website.
That’s how you can change URL of WordPress website. Hopefully, you find this article helpful.
You can also follow us on Facebook and Twitter. If you have any queries, feel free to ask on the comment section below:
Other Related Articles: