Skip to content

Instantly share code, notes, and snippets.

@avioli
Created August 25, 2015 01:21
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 avioli/0d9b8ca478a9bc90c6aa to your computer and use it in GitHub Desktop.
Save avioli/0d9b8ca478a9bc90c6aa to your computer and use it in GitHub Desktop.
// WP_HOME env should be sans trailing slash
define( 'WP_HOME', 'http://localhost:8080' );
define( 'WP_SITEURL', WP_HOME );
ob_start( function( $buf = '' ) {
return str_replace( 'http://previous.domain.com:PORT', WP_HOME, $buf );
});
// WordPress calls wp_ob_end_flush_all() when shutting down. In wp-includes/functions.php
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment