How to change WordPress Address and Site Address

There are 3 ways in which you can change the WordPress Address URL and Site Address URL, but first let us know what these URL actually mean.

The “WordPress Address URL” setting is the address you want people to type in their browser to reach your WordPress blog.
The “Site Address URL” setting is the address where your WordPress core files reside.

Method 1. First method is simply by going to your General Settings tab and changing the URL(s)

WordPress address (URL) & Site address (URL)

Method 2. Edit wp-config.php file [Using ftp]

It is possible to set the site URL manually in the wp-config.php file. Add these two lines to your wp-config.php, where “example.com” is the correct location of your site. You won’t be able to edit them on the General settings page anymore when using this method.

{code type=php}

define(‘WP_HOME’,’http://example.com’);
define(‘WP_SITEURL’,’http://example.com’);

{/code}


Method 3. Edit function.php file [Using ftp]

FTP to the site, and get a copy of the active theme’s functions.php file. You’re going to edit it in a simple text editor (like notepad) and upload it back to the site.

Add these two lines to the file, immediately after the initial “<?php” line.

{code type=php}

<?php
update_option(‘siteurl’,’http://example.com/blog’);
update_option(‘home’,’http://example.com/blog’);

{/code}

Feel free to write in if you are not  still not able to get it working !