Skip to content

Instantly share code, notes, and snippets.

@gistfrojd
Last active March 24, 2016 07:49
Show Gist options
  • Save gistfrojd/6501716f914f970f0484 to your computer and use it in GitHub Desktop.
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)
<?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