Last active
March 24, 2016 07:49
-
-
Save gistfrojd/6501716f914f970f0484 to your computer and use it in GitHub Desktop.
An example file that contains extra settings for Wordpress wp-config.php (this file has moved to https://github.com/Frojd/Manual)
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
<?php | |
// Recognize protocol from load balancer/varnish | |
if (isset($_SERVER["HTTP_X_FORWARDED_PROTO"]) && $_SERVER["HTTP_X_FORWARDED_PROTO"] == "https") { | |
$_SERVER["HTTPS"] = "on"; | |
} | |
// Forward ip from load balancer/varnish | |
if (isset($_SERVER["HTTP_X_FORWARDED_FOR"])) { | |
$_SERVER["REMOTE_ADDR"] = $_SERVER["HTTP_X_FORWARDED_FOR"]; | |
} | |
// Use custom theme as default | |
define("WP_DEFAULT_THEME", "yourtheme"); | |
// Disable the Plugin and Theme Editor | |
// Set to false on dev environment | |
define("DISALLOW_FILE_EDIT", true); | |
// Disable Plugin and Theme Update and Installation | |
// Set to false on dev environment | |
define("DISALLOW_FILE_MODS", true); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment