Last active
October 18, 2017 21:03
-
-
Save marcbacon/2cf5806888d32ab8c484 to your computer and use it in GitHub Desktop.
[Change a WordPress Domain] Used to change a WordPress site's domain. #wordpress
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
//In wp-config.php: | |
define('WP_HOME','http://example.com'); | |
define('WP_SITEURL','http://example.com'); | |
//In functions.php: | |
update_option('siteurl','http://example.com'); | |
update_option('home','http://example.com'); |
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
//In wp-config.php: | |
define('WP_SITEURL', ($_SERVER['HTTPS'] ? 'https://' : 'http://') . $_SERVER['HTTP_HOST']); | |
define('WP_HOME', ($_SERVER['HTTPS'] ? 'https://' : 'http://') . $_SERVER['HTTP_HOST']); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment