Skip to content

Instantly share code, notes, and snippets.

@sajidzaman
Created September 25, 2013 17:11
Show Gist options
  • Save sajidzaman/6702821 to your computer and use it in GitHub Desktop.
Save sajidzaman/6702821 to your computer and use it in GitHub Desktop.
After server migration of the Wordpress site. add the following code in wp-config.php
<?php
$protocol = (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off' || $_SERVER['SERVER_PORT'] == 443) ? "https://" : "http://";
define('WP_DEBUG', false);
define('WP_HOME', $protocol . $_SERVER['HTTP_HOST']);
define('WP_SITEURL', $protocol . $_SERVER['HTTP_HOST']);
define('WP_CONTENT_URL', '/wp-content');
define('DOMAIN_CURRENT_SITE', $_SERVER['HTTP_HOST']);
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment