Last active
December 24, 2015 01:19
Simple Solution to run a Development WordPress installation with the same database and codebase as the production server.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Substitute URL for local/dev deploys | |
if ($option == "siteurl" || $option == "home") { | |
if ( strcmp($_SERVER['HTTP_HOST'], 'http://localhost') != 0) | |
return "http://$_SERVER[HTTP_HOST]"; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
• Insert the above code into wp-includes/option.php between line 37 and 39.
• Change http://localhost to your development URL
• Change
return "http://$_SERVER[HTTP_HOST]";
toreturn "http://$_SERVER[HTTP_HOST]";
to use SSL.