WordPress Multisite Installation with Nginx Multisite Management from a Single Center
What will you learn in this guide?
In this guide, you'll learn how to manage multiple sites from a single WordPress installation.
We will set up a subdomain-based WordPress Multisite structure on Nginx and connect different domain names to this structure.
🧠 Technical Summary
Main Technical Topic:
WordPress Multisite installation and domain mapping using Nginx on Ubuntu 14.04.
Solved Problem:
Eliminating the cost of managing multiple WordPress installations separately.
Steps Followed:
- Wildcard DNS configuration
- LEMP (Nginx, MySQL, PHP) installation
- Nginx multisite settings
- WordPress Multisite activation
- Domain mapping
1️⃣ Configure DNS Wildcard Records
- Instead of opening a separate DNS record for each subdomain, a wildcard record is used.
Sample record:
*.example.com → SERVER_IP
- Thanks to this registration, all subdomains such as
site1.ornek.com,site2.ornek.comwork.
2️⃣ Install LEMP Stack and Prepare Nginx
Install all necessary components with one command:
apt-get update
apt-get install -y nginx mysql-server php5-fpm php5-mysql php5-curl php5-mcrypt php5-gd
- This command installs the necessary PHP modules for Nginx, MySQL and WordPress.
- Create root directory for WordPress files:
mkdir /usr/share/nginx/wordpress
- This directory is the main folder of the entire multisite structure.
3️⃣ Nginx Multisite Configuration
- Create a new Nginx configuration file:
nano /etc/nginx/sites-available/wp-ms
- This file meets all domain and subdomain requests.
Example configuration:
server {
listen 80;
server_name ornek.com *.ornek.com magaza.com;
root /usr/share/nginx/wordpress;
index index.php index.html;
location / {
try_files $uri $uri/ /index.php?$args;
}
location ~ \.php$ {
include fastcgi_params;
fastcgi_pass unix:/var/run/php5-fpm.sock;
}
}
- This configuration redirects the main domain and all subdomains to a single WordPress installation.
Activate the file and restart Nginx:
ln -s /etc/nginx/sites-available/wp-ms /etc/nginx/sites-enabled/wp-ms
service nginx restart
4️⃣ Activate WordPress Multisite Feature
- Open wp-config.php file:
nano /usr/share/nginx/wordpress/wp-config.php
Add the following line:
define('WP_ALLOW_MULTISITE', true);
- This line opens the “Network Setup” screen in the WordPress panel.
From the panel:
- Go to Tools → Network Setup and select Subdomains.
- Add the given codes back to the wp-config.php file.
5️⃣ Domain Mapping
- Use the WordPress MU Domain Mapping plugin to connect subsites to different domains.
Summary steps:
-
Upload the plugin to wp-content/plugins directory
-
Copy sunrise.php file into wp-content
-
Add the following line in wp-config.php:
define('SUNRISE', 'on');
-
This setting activates the domain mapping feature.
-
You can connect each site to its own domain name from the network panel.
❓ Frequently Asked Questions (FAQ)
1. Is a separate database used for each site? No. All sites use one database, table prefixes are different.
2. Does Nginx read .htaccess files? No. All redirects are done in Nginx configuration.
3. Can subsite administrators install plugins? No. Only the Super Administrator has the authority to install plugins.
4. Can a different SSL be installed on each site? Yes. Separate SSL is recommended for each domain.
🚀 Result
WordPress Multisite makes multisite management seriously easy. It offers a centralized, high-performance and scalable structure. You can safely use this architecture on the GenixNode infrastructure.

