Override WordPress and Site URL

This snippet lets you redfine two constants that makes it possible to work with production databases, locally. It lets you use the same database for production and development.

THIS does not change the database records or something. No need to search and replace a whole lot of data in SQL.

You can read what the WordPress Codex have to say, and also checkout beingzoe.com that has written about this.

Code Snippet:

// Define wp home and site url
define('WP_HOME','http://production.whateversite.com');
define('WP_SITEURL','http://production.whateversite.com');

Posted in Pure hacks