How to Change the Site URL and Home URL Settings in WordPress?

WordPress offers two configurable URLs to load the content correctly: the WordPress address and the Site address. WordPress highly relies on these URL settings as each has its importance. However, WordPress beginners often find these terms confusing about what each one does or why we need them. 

So, in this article, we will provide you with a complete understanding of the WordPress address and Site address.

Site Address – Site URL
The Site Address or Site URL is the address you want your website visitors to type in a web browser to reach your website. For example, if your website is, then http:// is your site address.

WordPress Address – WordPress URL
The WordPress address is the location of the core WordPress files. In most cases, the Site URL and WordPress URL (HOMEURL) will be the same unless you install WordPress in a separate folder.

For example, your WordPress URL and Site URL will be the same if you install WordPress into the document root (/home/cPanel_user/public_html/). To access the WordPress dashboard, you will have to visit

If you install WordPress in some subdirectory, such as 'WordPress,' your site URL would be

To access the admin dashboard, you will have to visit

Why do you need to change these URLs?
It would help if you changed these URLs when you move a WordPress website to a new location or you want to shift your website to a brand-new domain. These options are most useful when you develop the latest version of your site in some subfolder and move it to the root directory when it is ready.

How do I change these URLs?
You can change these URLs using any one of these two options:
  • Using WordPress admin
  • Using wp-config.php file
Using WordPress Admin
1. At the WordPress dashboard, you are given an option to modify these URL values.
2. Once logged into the WordPress dashboard, navigate to Settings >> General page.
3. Enter the new  WordPress Address or Site Address value and click Save Changes.
Wordpress Admin
Using wp-config.php file
The easiest way to modify WordPress URLs is via the wp-config.php file –
  1. Edit your wp-config.php file.
  2. Insert the following two lines and define your WP_HOME and WP_SITEURL in the wp-config.php file.


Adding the Site URL in the wp-config.php file will override the WordPress admin settings.

Change WordPress Address from the Database
Sometimes your last changes may lock you out from WordPress dashboard access. In such a case, you may directly modify WordPress URL settings from the WordPress database using the phpMyAdmin tool. 

The following instructions will guide you on changing the WordPress website URL using phpMyAdmin in cPanel.

1. Back up the WordPress database first before making any changes to the WordPress database. 
2. Log in to cPanel and navigate to the phpMyAdmin menu.

Login to phpmyadmin

3. Select the database which is being used for your WordPress website.

Select wp-options table

4. Click on wp_options table and find option_name - siteurl.
5. Click the checkbox, then click Edit

Siteurl and Home

6. Change the option_value to the correct URL. 
7. Scroll to the bottom and click Go to save the change.

Change Siteurl

8. Search option_name - home and repeat the process.

→ Are you looking to change the WordPress URL? 
Refer to the Change WordPress URL for more details.

Was this answer helpful?

« Back