Category Archives: WordPress

How to change the URL of a WordPress site?

Sometimes you need to change your WordPress site url, or just you want to clone it. There is a lot of ways to make this change, but the most easier and effective that I have found is this:

From the new site url:

Add this line at the top of wp-config.php:

<?php
define(‘RELOCATE’,true);

Now visit your site login page: http://yourNewURL.com/wp-login.php

Login there and the change will be done. It is possible that you want to go Settings -> General and check there that WordPress Address (URL) and Site Address (URL) are correct.

After that, you can remove the RELOcATE line from the wp-config.php file.