Skip to content

Instantly share code, notes, and snippets.

@infn8
Last active December 29, 2015 00:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save infn8/7589659 to your computer and use it in GitHub Desktop.
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.
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