Created
November 7, 2013 05:33
-
-
Save avioli/7349520 to your computer and use it in GitHub Desktop.
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
<?php | |
# add to your wp-config.php, ANYWHERE before "require_once(ABSPATH . 'wp-settings.php');" line | |
# you can drop the :8080 if you serve it on the regular port | |
# change <your.old.domain.com> to your domain you wish to replace | |
define('WP_HOME', 'http://localhost:8080'); | |
define('WP_SITEURL', 'http://localhost:8080'); | |
function _fix_siteurl_in_html( $buf = '' ) { | |
$buf = str_replace( 'http://<your.old.domain.com>/', WP_SITEURL . '/', $buf ); | |
return $buf; | |
} | |
ob_start('_fix_siteurl_in_html'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment