WordPress Multisite is a powerful feature that allows you to create and manage multiple, relatively independent websites using a single WordPress installation. Each site can have its own administrator, while the main site's super administrator retains control over the entire network. This guide will walk you through enabling and configuring this hidden feature.
Pre-Configuration Steps
Before you begin, it's advisable to take these precautions to prevent potential plugin or theme conflicts:
- Temporarily deactivate all installed plugins.
- Switch your site's theme to a default WordPress theme (e.g., Twenty Twenty-Four).
Enable Multisite Configuration
First, you need to enable the Multisite feature in your WordPress configuration file.
- Using FTP or your file manager, locate and edit the wp-config.php file in your WordPress root directory.
- Add the following code before the line that reads
/* That's all, stop editing! Happy publishing. */:
// Enable WordPress Multisite
define( 'WP_ALLOW_MULTISITE', true );
Save and upload the file.
Run the Network Installer
- Log in to your WordPress admin dashboard.
- Navigate to Tools > Network Setup. This menu item will only appear after the previous step.
- On the setup page, you must choose a network structure:
- Sub-domains: Sites will use addresses like site1.yourdomain.com. This typically requires DNS wildcard configuration.
- Sub-directories: Sites will use addresses like yourdomain.com/site1. This is simpler to configure.
Select your preferred option, fill in the network title and admin email, then click Install.
Complete Network Configuration
After running the installer, WordPress will generate two crucial pieces of configuration code.
- First Code Block: Add this to your wp-config.php file, placing it after the
WP_ALLOW_MULTISITEdefinition you added earlier. - Second Code Block: Use this to replace (overwrite) the .htaccess file in your website's root directory (for Apache servers). If you use Nginx, you must manually add the generated rewrite rules to your server configuration.
After adding the code and updating the files, click the link at the bottom of the page to log back into your WordPress admin.
Access and Manage the Multisite Network
Once configured, your Multisite network is active. You can manage the entire network by visiting:
http://yourdomain.com/wp-admin/network/
Here, as the super administrator, you can add new sites, manage all sites, and enable network-wide plugins and themes.
Additional Notes for Sub-domain Mode
If you selected the "Sub-domains" mode, you must add a DNS "wildcard" record so that any subdomain (like site1.yourdomain.com) correctly points to your main site.
- Record Type: A record
- Host/Name: * (a single asterisk)
- Value/Points to: Your server's IP address
DNS changes can take from a few hours up to 48 hours to propagate globally.