Skip to content

Instantly share code, notes, and snippets.

@arbaouimehdi
Created September 18, 2017 21:25
Show Gist options
  • Save arbaouimehdi/be40cb02ca66b07709df8d886507934f to your computer and use it in GitHub Desktop.
Save arbaouimehdi/be40cb02ca66b07709df8d886507934f to your computer and use it in GitHub Desktop.
WordPress Multisite With Top Level Domain Names (TLDs)
# BoF WordPress
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
# add a trailing slash to /wp-admin
RewriteRule ^wp-admin$ wp-admin/ [R=301,L]
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
RewriteRule ^(wp-(content|admin|includes).*) $1 [L]
RewriteRule ^(.*\.php)$ wp/$1 [L]
RewriteRule . index.php [L]
# EoF WordPress
<?php
/**
* The base configuration for WordPress
*
* The wp-config.php creation script uses this file during the
* installation. You don't have to use the web site, you can
* copy this file to "wp-config.php" and fill in the values.
*
* This file contains the following configurations:
*
* * MySQL settings
* * Secret keys
* * Database table prefix
* * ABSPATH
*
* @link https://codex.wordpress.org/Editing_wp-config.php
*
* @package WordPress
*/
// ** MySQL settings - You can get this info from your web host ** //
/** The name of the database for WordPress */
define('DB_NAME', 'hello_world');
/** MySQL database username */
define('DB_USER', 'root');
/** MySQL database password */
define('DB_PASSWORD', '_password_');
/** MySQL hostname */
define('DB_HOST', 'localhost');
/** Database Charset to use in creating database tables. */
define('DB_CHARSET', 'utf8mb4');
/** The Database Collate type. Don't change this if in doubt. */
define('DB_COLLATE', '');
/**#@+
* Authentication Unique Keys and Salts.
*
* Change these to different unique phrases!
* You can generate these using the {@link https://api.wordpress.org/secret-key/1.1/salt/ WordPress.org secret-key service}
* You can change these at any point in time to invalidate all existing cookies. This will force all users to have to log in again.
*
* @since 2.6.0
*/
define('AUTH_KEY', 'zq0`;~pZ#Mh w`#CM.VAG_(i4#l(XsmfBO*m{)@UP%1:ms1oq;^Wun!g;g0avP.^');
define('SECURE_AUTH_KEY', ',m8 lzNQC~_jCHZ=DY`wz761Y3QH;9-.e#eY+cASpa=qFv]VP,ZP*KSPZ@myRgJ-');
define('LOGGED_IN_KEY', 'vf8Y@,%;.Sg*F;bs8v|;h8>Sy{E4iI%0XMet~Thtmf7]Ef_JyfKn|zS0_O|H]lbP');
define('NONCE_KEY', 'Y>HW4x*p[:$Rjk.F=?s$DU!mPn*Es#f{d8/M<8:$ B`N&:QCOX,%b-){[-sv2XD?');
define('AUTH_SALT', '#5voQEe7(j=yp$hYk5T;a(19;w M8D2L,cb4Yl)Ucu3QjeqWoA,$.yeO5BwRQ{bG');
define('SECURE_AUTH_SALT', '|RN5?QJm^yYh9=?1-eR6N0hce+P,]{.3?Pcq7,]x7nZe:n Y!osF^8FfcZ$}&l?~');
define('LOGGED_IN_SALT', '%y8~US]Kt9Dx2x6 i6bo~6R@0v9wIXB+Xe<AD;$en83*,<EJ}3SHby8i[S?L%#d ');
define('NONCE_SALT', 'HcvG},aSZ%tGs59db@0N3:V9ca{1.+qTZH#q`^(x*?yOyfz(nubji].h&A}f}Lzz');
/**#@-*/
/**
* 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 = 'wp_';
/**
* For developers: WordPress debugging mode.
*
* Change this to true to enable the display of notices during development.
* It is strongly recommended that plugin and theme developers use WP_DEBUG
* in their development environments.
*
* For information on other constants that can be used for debugging,
* visit the Codex.
*
* @link https://codex.wordpress.org/Debugging_in_WordPress
*/
define('WP_DEBUG', false);
/* That's all, stop editing! Happy blogging. */
/* Multisite */
define( 'WP_ALLOW_MULTISITE', true );
define('MULTISITE', true);
define('SUBDOMAIN_INSTALL', true);
define('DOMAIN_CURRENT_SITE', 'primarydomain.com');
define('PATH_CURRENT_SITE', '/');
define('SITE_ID_CURRENT_SITE', 1);
define('BLOG_ID_CURRENT_SITE', 1);
define( 'COOKIE_DOMAIN', '' );
define( 'ADMIN_COOKIE_PATH', '/' );
define( 'COOKIEPATH', '/' );
define( 'SITECOOKIEPATH', '/' );
/** 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