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 mydomain.com then http:// mydomain.com 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 http://mydomain.com/wp-admin.
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.
Using wp-config.php file
The easiest way to modify WordPress URLs is via the wp-config.php file.
- Edit your wp-config.php file.
- 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.
- Before you make any changes to WordPress database, first backup WordPress database.
- Login to cPanel and navigate to phpMyAdmin menu.
- Select the database which is being used for your WordPress website.
- Click on wp_options table and find option_name namely siteurl. Click the checkbox then click Edit.
- Change the option_value to the correct URL. Scroll to the bottom and click Go to save the change.
- Search option_name namely home and repeat the process.
→ Looking to change the Wordpress URL? Please refer to the change wordpress URL for more details.