How to change WordPress address with wp-config.php file.

Started by Rahul Sambre, July 24, 2016, 05:20:45 AM

Previous topic - Next topic

Rahul Sambre

Hello,

The easiest way to modify your WordPress URLs is via the wp-config.php file. If you've moved your WordPress site or are trying to test it from a temporary URL, this also might be the only method that works for you.

1) Edit your wp-config.php file.
2) Define your WP_HOME and WP_SITEURL settings by inserting below lines to the top.

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

That's it.  :)