Updating WordPress siteurl & sitehome for new domain easily without touching the database

Published by: 0

If you have recently moved your WordPress to another domain and need to quickly change the domain url without touching the database. This class is for you.

  1. Open  wp-config.php 
  2. Put in the following lines of codes at the top of the page after the <?php
define('WP_HOME','http://example.com');

define('WP_SITEURL','http://example.com');

You need to change the example.com to your new domain URL

3) If you are having trouble accessing your WP-admin dashboard, then add the following into your wp-config.php as well.

define('RELOCATE',true);

That’s all !