Last active
December 29, 2015 00:59
-
-
Save infn8/7589659 to your computer and use it in GitHub Desktop.
a method for deploying a dev site without having to update every reference to the new site. perfect for when your local dev is using a host file but you want to show your client some progress.For wordpress add this to wp-config.php at the top and edit the $old and $new variables for the domains you need to edit.
This file contains 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
function ob_local_dev($buffer){ | |
$old = "http://example.com"; | |
$new = "http://dev.example.com"; | |
return str_replace($old, $new, $buffer); | |
} | |
ob_start("ob_local_dev"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment