Digital Marketing

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:


(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.


Popular posts from this blog

MySQL Sandbox with the Sakila sample database