Installation, Configuration & Correct .htaccess Setup
Contents
Introduction
Managing multiple websites separately can be difficult and time-consuming. WordPress Multisite solves this problem by allowing you to manage multiple websites from a single WordPress installation.
In this LitRuh guide, you’ll learn:
- What WordPress Multisite is
- How to install and configure it
- Why the
.htaccessfile is important - The correct
.htaccesscode for Multisite with LiteSpeed
What Is WordPress Multisite?
WordPress Multisite is a built-in feature that lets you run multiple websites from one dashboard.
With Multisite, you can:
- Manage many sites under one admin
- Share themes and plugins
- Control users centrally
- Add new sites quickly
Each site can still have its own content, users, and settings.
When Should You Use WordPress Multisite?
WordPress Multisite is best for:
- Companies with multiple regional websites
- Blogs with multiple sections or languages
- Educational or corporate networks
- Franchise or brand-based websites
It is not recommended if every site needs very different server settings or heavy custom plugins.
Types of WordPress Multisite
1. Subdirectory Setup
Example:
example.com/site1
example.com/site2
2. Subdomain Setup
Example:
site1.example.com
site2.example.com
Note: Subdomains require DNS wildcard support.
How to Install WordPress Multisite (Brief Steps)
Step 1: Enable Multisite
Add this line to wp-config.php:
define('WP_ALLOW_MULTISITE', true);
Step 2: Network Setup
Go to Dashboard → Tools → Network Setup, choose subdomain or subdirectory, and install.
Step 3: Update wp-config.php
Add the network configuration provided by WordPress, for example:
define('MULTISITE', true);
define('SUBDOMAIN_INSTALL', false);
define('DOMAIN_CURRENT_SITE', 'example.com');
define('PATH_CURRENT_SITE', '/');
define('SITE_ID_CURRENT_SITE', 1);
define('BLOG_ID_CURRENT_SITE', 1);
Why the .htaccess File Is Critical in Multisite
The .htaccess file controls:
- URL routing for all sites
- Admin and dashboard access
- Media uploads
- Proper loading of sub-sites
An incorrect .htaccess file can cause:
- Redirect loops
- Network admin login issues
- 404 errors on sub-sites
That’s why using the correct Multisite rules is essential.
Correct .htaccess Code for WordPress Multisite (LiteSpeed)
Below is the correct and tested .htaccess configuration for WordPress Multisite running on LiteSpeed servers:
# BEGIN LSCACHE
# END LSCACHE
# BEGIN NON_LSCACHE
# END NON_LSCACHE
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
# add a trailing slash to /wp-admin
RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
RewriteRule ^([_0-9a-zA-Z-]+/)(wp-(content|admin|includes).*) $2 [L]
RewriteRule ^([_0-9a-zA-Z-]+/)(.*\.php)$ $2 [L]
RewriteRule . index.php [L]
</IfModule>
# END WordPress
# BEGIN LiteSpeed
<IfModule Litespeed>
SetEnv noabort 1
</IfModule>
# END LiteSpeed
Simple Explanation of Important Rules
RewriteEngine On→ Enables URL rewritingwp-adminrule → Fixes admin redirect issuesREQUEST_FILENAME→ Allows real files and foldersindex.php→ Routes requests to the correct site
Best Practices for Multisite
- Install plugins only when required network-wide
- Keep themes lightweight
- Always test changes in staging
- Take backups before editing
.htaccess
Final Thoughts from LitRuh
WordPress Multisite is a powerful solution for managing multiple websites efficiently. However, correct configuration—especially the .htaccess file—is the key to stability and performance.
By following this LitRuh guide, you can confidently install, configure, and manage a secure WordPress Multisite network.
