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

WordPress offers two configurable URLs namely WordPress address and Site address to load the content correctly. WordPress highly relies on these URL settings as each of them have their own importance. More often WordPress beginners find these terms puzzling as what each one really does or why we need them. In this article, we will give you a complete understanding of these terms.

Site Address – Site URL

The Site Address or SITEURL is the address you want your website visitors to type in a web browser to reach your website. Say 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, both SITEURL and WordPress URL (HOMEURL) will be same unless you install WordPress in a separate folder.

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

If you install WordPress in some subdirectory, say 'wordpress' then your SITEURL would be To access the admin dashboard, you will have to visit

Why you need to change these URLs?

You will require to change these URLs when you move a WordPress website to a new location or you want to shift your website to brand new domain. These options are most useful when you develop the new version of your site in some subfolder and you wish to move in the root directory when it is ready.

How do I change these URLs?

Using WordPress admin

At WordPress dashboard, you are given an option to modify these URL values. Once you are logged into WordPress dashboard, navigate to Settings >> General page. Enter the new value for WordPress Address or Site Address 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 following 2 lines and define your WP_HOME and WP_SITEURL in wp-config.php file. Please note that adding SITEURL in the wp-config.php file will override the WordPress admin settings.


Change WordPress address from database

Sometimes your previous changes may lock you out from WordPress dashboard access. In such case, you may directly modify WordPress URL settings from the WordPress database using the phpMyAdmin tool. Following instructions will guide you on how to change the WordPress website URL using phpMyAdmin in cPanel.

  1. Before you make any changes to WordPress database, first backup WordPress database.
  2. Login to cPanel and navigate to 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 namely siteurl. Click the checkbox then click Edit.

    Siteurl and Home

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

    Change Siteurl

  6. Search option_name namely home and repeat the process.

  • 5 Users Found This Useful

Was this answer helpful?

Related Articles

How to Upload a WordPress theme?

Sometimes you are required to upload and install a WordPress theme manually, especially when you...

How to Fix White Screen of Death Error in WordPress?

Everyone who is involved in WordPress development must have faced this annoying white page...

How to configure WordPress to use temporary URL?

WordPress is a CMS application that can be installed and accessed through a domain name. As per...

How to make a WordPress Website Search Engine Friendly?

You can make your WordPress blog SEO-friendly by configuring the URL structure with permalinks....

How to Leverage Browser Caching of WordPress Website via .htaccess?

If you've ever checked your WordPress website in Performance Tools such as Google PageSpeed...