Nov 8, 2018

How to change your WordPress Address (URL) and Site Address (URL)

  1. The "Home" setting is the address you want people to type in their browser to reach your WordPress blog.
  2. The "Site URL" setting is the address where your WordPress core files reside.
  3. Both settings should include the http:// part and should not have a slash "/" at the end.
  4. The site_url() will always be the location where you can reach the site by tacking on /wp-admin on the end, while home_url() would not reliably be this location.
  5. site_url() references the field labeled "WordPress Address (URL)" in General > Settings.
  6. home_url() would be where you have set your homepage by setting General > Settings "Site Address (URL)" field.
To change your WordPress Address (URL) and Site Address (URL)

Edit wp-config.php
It is possible to set the site URL manually in the wp-config.php file.

Add these two lines to your wp-config.php:

define('WP_HOME','http://admin.i88.ca');
define('WP_SITEURL','http://sns.i88.ca');

(If you want your wordpress runs only on https, then you just need to change the above http to https)

You won't be able to edit them on the General settings page any more when using this method.

This option is good for me. Why you would prefer this way instead of changing directly in the admin panel? Because this change often makes you can not access your admin panel if you do not configure it correctly.