How to Set Up Multiple WordPress Sites on a Single Server: Multisite vs. Separate Installs
Content
Managing multiple WordPress websites is a common need, whether for client projects, multilingual content, or separate business units. A frequent point of confusion is choosing the right architecture: a single WordPress Multisite network or multiple, separate WordPress installations. This guide will explain the core differences, common setup challenges, and help you decide the best approach for your project.
The Core Dilemma: One Database or Many?
The threads reveal a central question: can multiple websites share one WordPress database? The answer defines your entire setup.
- WordPress Multisite (Single Database): This is a specific WordPress feature that allows you to create a network of sites from a single WordPress installation and a single database. All sites in the network share the same core code, plugins, and themes, but have separate tables for their content (e.g.,
wp_2_posts). This is ideal for sites that need to be closely related and managed from a single dashboard, like a company with regional subdomains (e.g.,ny.example.com,la.example.com) or a network of blogs under one brand. - Separate Installations (Multiple Databases): This involves installing WordPress multiple times in different directories or on different (sub)domains, each with its own completely separate database. The sites are entirely independent. They can run different themes, plugins, and versions of WordPress without affecting each other. This is the recommended method for sites that are functionally different, have different security requirements, or are for completely separate clients or businesses.
Why You Can't Simply Share a Database Between Independent Sites
A common misconception, as seen in the threads, is trying to point two independent WordPress installations at the same database with the same table prefix (e.g., wp_). This will cause severe conflicts and errors. WordPress stores full URLs (e.g., http://example.com) in its database. Two different domains cannot use this same data correctly. Each isolated WordPress site must have its own dedicated database or, at the very least, its own unique table prefix within a shared database instance.
Common Setup Challenges and Solutions
1. Configuring Your Web Server (Nginx/Apache)
Whether you choose Multisite or separate installs, your server must be configured to direct traffic for different domains to the correct WordPress files.
- For Separate Installations: You must create a separate server block (Nginx) or <VirtualHost> block (Apache) for each domain or subdirectory. Each block points the
ServerName(e.g.,website2.com) to its own unique document root (e.g.,/var/www/html/website2). - For Multisite with Multiple Domains: The configuration is more complex. You typically need a wildcard server block that handles all requests for the network and relies on WordPress's domain mapping logic, often assisted by a plugin like 'Multiple Domain Mapping on Single Site'.
2. The Subdirectory vs. Subdomain Choice in Multisite
A key limitation of WordPress Multisite is that the choice between using subdirectories (maindomain.com/site2) or subdomains (site2.maindomain.com) is often locked during setup. Furthermore, as noted in the threads, installing Multisite with subdirectories on a site older than 30 days can be problematic due to potential conflicts with existing content permalinks.
3. Database and User Management
For separate installations, best practice is to create a new database and a new database user for each site. This maximizes security and isolation. If your hosting plan limits the number of databases, you can install multiple sites in one database by giving each one a unique table prefix (e.g., wp_site1_, wp_site2_) during the famous 5-minute install.
Summary: Which Should You Choose?
| Scenario | Recommended Setup |
|---|---|
| Sites share a common theme, plugin set, and are part of one organization/brand. | WordPress Multisite |
| Sites are for different clients, need different plugins/themes, or must be completely isolated for security. | Separate WordPress Installations |
| Creating a multilingual site where each language is a separate site. | Either, but often easier with a translation plugin (e.g., WPML) on a single site. |
| Running a development/staging site alongside a live site. | Separate Installations (on a subdomain or in a subdirectory) to avoid any risk to the live site. |
Ultimately, the "correct" setup depends entirely on your specific needs for management, isolation, and performance. For most users requiring distinct sites, separate installations are the simpler and safer path. For large networks of similar sites, Multisite offers powerful centralized management.
Related Support Threads Support
-
Trouble with NginX setting for multi-site’s multi-domain mappinghttps://wordpress.org/support/topic/trouble-with-nginx-setting-for-multi-sites-multi-domain-mapping/
-
WP Engine Hosting Issue for an Updated Blogsite using CPanelhttps://wordpress.org/support/topic/wp-engine-hosting-issue-for-an-updated-blogsite-using-cpanel/
-
I need to install wordpress on multiple domains with the same DB.https://wordpress.org/support/topic/i-need-to-install-wordpress-on-multiple-domains-with-the-same-db/
-
Issues installing two WordPress Instances on same serverhttps://wordpress.org/support/topic/issues-installing-two-wordpress-instances-on-same-server/
-
Same WordPress instance for multiple virtual directories?https://wordpress.org/support/topic/same-wordpress-instance-for-multiple-virtual-directories/
-
Setting up multiple sites on WordPresshttps://wordpress.org/support/topic/setting-up-multiple-sites-on-wordpress/
-
is it the same usage for wp org running out for different hosting?https://wordpress.org/support/topic/is-it-the-same-usage-of-platform-for-wordpress-org-running-out-for-different-hos/
-
Same DB for 2 siteshttps://wordpress.org/support/topic/same-db-for-2-sites/
-
Mutilpe one domain with mutiple database possibilitieshttps://wordpress.org/support/topic/mutilpe-one-domain-with-mutiple-database-possibilities/
-
install WP in subdirectory: Database and Userhttps://wordpress.org/support/topic/install-wp-in-subdirectory-database-and-user/
-
Installing two instances of WP in one domainhttps://wordpress.org/support/topic/installing-two-instances-of-wp-in-one-domain/
-
WP installation (root/subdir/subdomain)https://wordpress.org/support/topic/wp-installation-root-subdir-subdomain/
-
WordPress Multisitehttps://wordpress.org/support/topic/wordpress-multisite-118/
-
Multiple WordPress-Installationshttps://wordpress.org/support/topic/multiple-wordpress-installations-4/
-
Installing WordPress to root *and* subdirectoryhttps://wordpress.org/support/topic/installing-wordpress-to-root-and-subdirectory/
-
Multisite Sub-directories Installationhttps://wordpress.org/support/topic/multisite-sub-directories-installation/
-
Can’t access sub-domain dashboard of multisite networkhttps://wordpress.org/support/topic/cant-access-sub-domain-dashboard-of-multisite-network-3/
-
WordPress MAMP Creating more than one websitehttps://wordpress.org/support/topic/wordpress-mamp-creating-more-than-one-website/
-
Common admin for WP + WP in subdirectoryhttps://wordpress.org/support/topic/common-admin-for-wp-wp-in-subdirectory/
-
Use same prefix database for two versions of WordPresshttps://wordpress.org/support/topic/use-same-prefix-database-for-two-versions-of-wordpress/
-
Local PC Development of Separate Domainshttps://wordpress.org/support/topic/local-pc-development-of-separate-domains/
-
Create multisite with subdirectorieshttps://wordpress.org/support/topic/create-multisite-with-subdirectories/
-
Installing two instances of WP with one docker container?https://wordpress.org/support/topic/installing-two-instances-of-wp-with-one-docker-container/
-
15 different subfolders with different wp installs?https://wordpress.org/support/topic/15-different-subfolders-with-different-wp-installs/