Skip to content

Instantly share code, notes, and snippets.

@guillaumemolter
Created September 3, 2015 18:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save guillaumemolter/b9c04efba3b072159525 to your computer and use it in GitHub Desktop.
Save guillaumemolter/b9c04efba3b072159525 to your computer and use it in GitHub Desktop.
Exemple of multisite wp-config with local-settings.php
<?php
/**
* The base configurations of the WordPress.
*
* This file has the following configurations: MySQL settings, Table Prefix,
* Secret Keys, and ABSPATH. You can find more information by visiting
* {@link https://codex.wordpress.org/Editing_wp-config.php Editing wp-config.php}
* Codex page. You can get the MySQL settings from your web host.
*
* This file is used by the wp-config.php creation script during the
* installation. You don't have to use the web site, you can just copy this file
* to "wp-config.php" and fill in the values.
*
* @package WordPress
*/
/* Local settings contains DB Credentials, SALTS and the DOMAIN_CURRENT_SITE */
if(file_exists(dirname(__FILE__) . '/' . 'local-settings.php')){
require_once(dirname(__FILE__) . '/' . 'local-settings.php');
}
else{
die(dirname(__FILE__) . '/' . "local-settings.php is missing, please read the repo's readme.md");
}
/**
* WordPress Database Table prefix.
*
* You can have multiple installations in one database if you give each a unique
* prefix. Only numbers, letters, and underscores please!
*/
$table_prefix = 'jkfu8_';
/** Disabling file editing from the admin */
define('DISALLOW_FILE_EDIT', true);
/** Network setup */
define( 'WP_ALLOW_MULTISITE', true );
define('MULTISITE', true);
define('SUBDOMAIN_INSTALL', true);
define('PATH_CURRENT_SITE', '/');
define('SITE_ID_CURRENT_SITE', 1);
define('BLOG_ID_CURRENT_SITE', 1);
/** Domain mapping */
define( 'SUNRISE', 'on' );
/* That's all, stop editing! Happy blogging. */
/** Absolute path to the WordPress directory. */
if ( !defined('ABSPATH') )
define('ABSPATH', dirname(__FILE__));
/** Sets up WordPress vars and included files. */
require_once(ABSPATH . 'wp-settings.php');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment