How To Change URL Of Your WordPress Site

Maybe you found a better domain name or you have set up with a temporary domain which you want to change now, or you are migrating your website from “HTTP to HTTPS.” Don’t worry I will show simple step by step process to change domain name of WordPress website.

To change the domain name of a website. You need the login credentials of your WordPress administrator, cPanel and FTP and access to PHPmyAdmin through your cPanel.

Before proceeding, create a complete backup of your website.

Here I will explain to change a domain name through two options. First one is very easy, but if you are unable to change the domain for any reason, then you can try the next option.

  1. Change the WordPress URL through Admin Dashboard

From the admin dashboard, you can change your WordPress URL. Open Admin Dashboard, and on the left side, there will be an option “settings.”  Take cursor over there, and many options will appear. Click on “General,” and there you will find two options.

    WordPress Address (URL): The address to reach the blog.

    Site Address (URL): The address of  WordPress core files.

Both should match, except you are providing WordPress with its directory. Remember that your WordPress dashboard can only be accessed via the new URL after you click on “Save Changes.”

How To Change URL Of Your WordPress Site

  1. Change the WordPress URL in wp-config.php File.

The second way to change a URL is through WP-config.php. It is worth noting that wp-config.php values override method one settings. Sometimes you cannot change URL through this process as files are hard-coded which makes fields not editable.

How To Change URL Of Your WordPress Site

Located at the root of your WordPress site (wp-config.php) can be accessed via  SSH, FTP or WP-CLI. To hard-code WP_HOME and WP_SITEURL, enter the following code towards the top of the file, modifying the values to reflect your domain.

define('WP_HOME','https://yourdomain.com');

define('WP_SITEURL','https://yourdomain.com');


Irfan Shafi
I am businessman, software engineer, artist, web designer and writer.

LEAVE A REPLY

Please enter your comment!
Please enter your name here

I am businessman, software engineer, artist, web designer and writer.

Must Read

BigCommerce vs Shopify – Comparison and Verdict

If you are planning to open an online store, then it's the right time to start an eCommerce Store. Research from many firms suggests...

BigCommerce Review 2019 – Pro’s, Con’s and Ratings

BigCommerce is a world-leading e-commerce platform that provides incredible scalability to online stores. BigCommerce is considered one of the best e-commerce platform for creating an...

How To Check Backlinks In Google Search Console

Checking backlinks can be a difficult task for blogs or companies having a small budget. But now you can check backlinks through Google webmasters...