How to change the WordPress Base Url or Site Url or Home Page Url on Migration

In wordpress Domain name change is a big issue you need to fixed. Here we are providing simple solution to fix the issue.

Step 1

Open wp-config.php file in your website root.

Step 2.

Add the folloing line after <?php tag.

define( 'WP_HOME', '' );
define( 'WP_SITEURL', '' );
define( 'RELOCATE', true );

Step 3.

Save your wp-config.php file.

Step 4.

Open wp-login.php in a web browser. For example, if your new site is at

Step 5.

Now go in Admin back-end, navigate to Settings > General and update Site Url and save.

Step 6

Now delete or comment lines added in wp-config.php file.

Your site has been migrated and updated for new domain.