Skip to content

Instantly share code, notes, and snippets.

@tim-steele
Forked from eddiemoya/wp-config.php
Created July 2, 2012 21:25
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tim-steele/3035803 to your computer and use it in GitHub Desktop.
Save tim-steele/3035803 to your computer and use it in GitHub Desktop.
WordPress - wp-config.php settings for dynamic host detection.
define( 'WP_CONTENT_DIR', $_SERVER['DOCUMENT_ROOT'] . '/wp-content' );
define( 'WP_PLUGIN_DIR', $_SERVER['DOCUMENT_ROOT'] . '/wp-content/plugins' );
define( 'PLUGINDIR', $_SERVER['DOCUMENT_ROOT'] . '/wp-content/plugins' );
define( 'WP_SITEURL', 'http://' . $_SERVER['HTTP_HOST'] . '/');
define( 'WP_HOME', 'http://' . $_SERVER['HTTP_HOST'] . '/');
define( 'WP_CONTENT_URL', 'http://' . $_SERVER['HTTP_HOST'] . '/wp-content');
define( 'WP_PLUGIN_URL', 'http://' . $_SERVER['HTTP_HOST'] . '/wp-content/plugins');
define( 'UPLOADS', 'wp-content/uploads' );
@AlviseNicoletti
Copy link

Amazing !

But what about HTTPS ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment