wiki:WordPress/MultiSite

Version 2 (modified by jorrit, 7 years ago) (diff)

--

Multi Site WordPress

This article describes what I did to set up a multi site Wordpress system running CentOS 7 using the RPM's available from EPEL.

yum install httpd wordpress mariadb-server
systemctl enable mariadb
systemctl enable httpd

Initiate mariadb

mysql_secure_installation

Create the database

mysql -u root -p
CREATE DATABASE wordpress;
CREATE USER wordpress@localhost IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON wordpress.* TO wordpress@localhost IDENTIFIED BY 'password';
FLUSH PRIVILEGES;
exit

Edit /etc/wordpress/wp-settings.php and include new salts generated here: https://api.wordpress.org/secret-key/1.1/salt/

Put in the following snippet before /* That's all, stop editing! Happy blogging. */

define( 'WP_ALLOW_MULTISITE', true );
define('MULTISITE', true);
define('SUBDOMAIN_INSTALL', true);
define('DOMAIN_CURRENT_SITE', 'dev.jorritsma.cc');
define('PATH_CURRENT_SITE', '/');
define('SITE_ID_CURRENT_SITE', 1);
define('BLOG_ID_CURRENT_SITE', 1);
define('COOKIE_DOMAIN', $_SERVER['HTTP_HOST']);