How to Change self-hosted WordPress url same server same location

If you are planning to use a new domain name/url for your site and the files stay in the same location, same server, same database, there is no need to move anything if you follow these simple steps:

1. First, point your nameserver(s).

2. Change the folder name of your old site. You can do this either through ftp or cpanel file manager.

For example: if your old url is, the folder name is shown as myoldsite.

Your new url :, then you should rename the folder myoldsite to mynewsite

3. On your cpanel, set up addon domain for

4. Go to PhpMyAdmin:

– Change urls on wp_options.
– after that, on click wp_posts, then click SQL and paste and run the following:

UPDATE wp_posts SET guid = REPLACE (

*** of course, you have to change these to your old and new url.

5. Using ftp, download wp-config.php to your pc.

6. Open wp-config.php with either notepad or dreamweaver.

7. Add these lines after anywhere after <?php


8. Login to your site using your old login data and save the right permalink setting.