How do you set up wordpress multisite? - Answers (2024)

As of WordPress 3.0, you have the ability to create a network of sites (Multisite). This article is instructions for creating a network. It is very similar to creating your own personal version of wordpress.com.NOTE: If you are currently running WordPress MU, you do not need to complete these steps. your network is already enabled. Once you upgrade to the 3.x branch, you will be prompted to update your .htaccess rules for MultiSite.

Alert! If you have upgraded from WordPress 3.0, the Super Admin menu has been replaced with the Network Admin section. Look on your admin HEADER on the far right: it will say "Howdy, YOURNAME". On 3.1, the link is visible as 'Network Admin.' On 3.2, it's in a drop-down.

Before You BeginContents[hide]

  • 1 Before You Begin
    • 1.1 Admin Requirements
    • 1.2 Server Requirements
    • 1.3 WordPress Settings Requirements
  • 2 Step 1: Backup Your WordPress
  • 3 Step 2: Setting Wildcard Subdomains
    • 3.1 Specific Configurations
  • 4 Step 3: Allow Multisite
  • 5 Step 4: Installing a Network
  • 6 Step 5: Enabling the Network
  • 7 Step 6: Network Admin Settings
  • 8 Things You Need To Know
    • 8.1 User Access
    • 8.2 Permalinks
    • 8.3 WordPress Plugins
    • 8.4 Categories and Tags
    • 8.5 Switching between subdomains and subfolders
    • 8.6 Apache Virtual Hosts and Mod Rewrite
    • 8.7 .htaccess and Mod Rewrite
    • 8.8 Importing into WordPress Network
  • 9 Related Articles

Admin RequirementsIf you want to run a network of blogs you should at least have a basic understanding of UNIX/Linux administration. A basic knowledge of WordPress development, PHP, HTML and CSS is recommended as well.

Setting up and running a multi-site installation is more complex than a single-site install. Reading this page should help you to decide if you really need a multi-site install, and what might be involved with creating one. If the instructions on this page make no sense to you, be sure to test things on a development site first, rather than your live site.

Server RequirementsSince this feature requires extra server setup and more technical ability, please check with your webhost and ask if they support the use of this feature. It is not recommended to try this on shared hosting.

You are given the choice between sub-domains or sub-directories in Step 4: Installing a Network. This means each additional site in your network will be created as a new virtual subdomain or subdirectory.

  • Sub-domains -- like site1.example.com and site2.example.com
  • Sub-directories -- like example.com/site1 and example.com/site2

It is also possible later, through use of a plugin such as WordPress MU Domain Mapping, to map individual sites to independent domain names.Sub-directory sitesIt works with the use of themod_rewrite feature on the server having the ability to read the .htaccess file, which will create the link structure.If you are using pretty permalinks in your blog already, then subdirectory sites will work as well.Sub-domain sitesIt works using wildcard subdomains. You must have this enabled in Apache, and you must also add a wildcard subdomain to your DNS records. (See Step 2 how to set up.)Some hosts have already set up the wildcard on the server side, which means all you need to add is the DNS record.Some shared webhosts may not support this, so you may need to check your webhost before enabling this feature.

WordPress Settings Requirements

  • Giving WordPress its own directory will not work in WordPress 3.0 with multisite enabled. It interferes with the member blog lookup. If you wish to install WordPress in a folder AND have that folder name it will work. Domain mapping, however, will not work.
  • You cannot create a network in the following cases:
    • "WordPress address (URL)" is different from "Site address (URL)".
    • "WordPress address (URL)" uses a port number other than ':80', ':443'.
  • You cannot choose Sub-domain Install in the following cases:
    • WordPress install is in a directory (not in document root).
    • "WordPress address (URL)" is localhost.
    • "WordPress address (URL)" is IP address such as 127.0.0.1.
  • You cannot choose Sub-directory Install in the following cases:
    • If your existing WordPress installation has been set up for more than a month, due to issues with existing permalinks. (This problem will be fixed in a future version. See Switching between subdomains and subfolders for more information.)

(See wp-admin/network.php for more detail)

Step 1: Backup Your WordPressYour WordPress will be updated when creating a Network. Please backup your database and files. Step 2: Setting Wildcard Subdomains(If this is a Sub-directories Install, skip this step.)

Sub-domain sites work with the use of wildcard subdomains. This is a two-step process:

  1. Apache must be configured to accept wildcards.
    1. Open up the httpd.conf file or the include file containing the VHOST entry for your web account.
    2. Add this line: ServerAlias *.example.com
  2. In the DNS records on your server, add a wildcard subdomain that points to the main installation. It should look like: A *.example.com

External links:

  • Wildcard DNS record (Wikipedia)
  • Apache Virtual Host (Apache HTTP Server documentation)

Specific ConfigurationsDue to the fact that every host is configured differently, the following 'per site' directions are not exhaustive. In all cases, if you cannot determine how to set up wildcard subdomains, contact your webhost for directions.

CPanel

Make a sub-domain named "*" (wildcard) at your CPanel (*.example.com). Make sure to point this at the same folder location where your wp-config.php file is located.

Plesk

There are several steps that differ when setting up the server for wildcard subdomains on a server using Plesk Panel compared to a server using cPanel (or no control panel). This article Configuring Wildcard Subdomains for multi site under Plesk Control Panel‎ details all the steps involved.

DirectAdmin panel

Click "User Panel" -> DNS Management -> add the following three entries using the three columns: * A xxx.xx.xx.xxx

(Replace "xxx.xx.xx.xxx" with your website IP.) Click "Admin Panel" (If you have no "admin panel" ask your host to do this.) -> Custom Httpd -> yourdomain.com -> In the text input area, just paste and "save" precisely the following: ServerAlias *.|DOMAIN|

(If you ever need to un-do a custom Httpd: return here, delete text from input area, save.)

  • DirectAdmin.com: Apache Wildcard Documentation... DirectAdmin.com forum: Wordpress wildcard subdomains.

Step 3: Allow MultisiteTo enable the Network menu item, you must first define multisite in the wp-config.php file.

Open up wp-config.php and add this line above where it says /* That's all, stop editing! Happy blogging. */: define('WP_ALLOW_MULTISITE', true);

Step 4: Installing a NetworkThis will enable the Network menu item to appear in the Tools menu. Visit Administration > Tools > Network to see the screen where you will configure certain aspects of our network. Tools Network SubPanel

Addresses of Sites in your NetworkYou are given the choice between sub-domains or sub-directories (if none of the above applies). This means each additional site in your network will be created as a new virtual subdomain or subdirectory. you have to pick one or the other, and you cannot change this unless you reconfigure your install. See also Before You Begin.

  • Sub-domains -- like site1.example.com and site2.example.com
  • Sub-directories -- like example.com/site1 and example.com/site2

Network DetailsThere are filled in automatically. Server AddressThe internet address of your network will be example.com.Network TitleWhat would you like to call your network?Admin E-mail AddressYour email address.

Double-check they are correct and click the Installbutton.

You may receive a warning about wildcard subdomains. Check Setting Wildcard Subdomains.

Warning! Wildcard DNS may not be configured correctly!

The installer attempted to contact a random hostname (13cc09.example.com) on your domain.

To use a subdomain configuration, you must have a wildcard entry in your DNS. This usually means adding a * hostname record pointing at your web server in your DNS configuration tool.

You can still use your site but any subdomain you create may not be accessible. If you know your DNS is correct, ignore this message.

Step 5: Enabling the NetworkThe rest of the steps are ones you must complete in order to finish. Tools Network Created

0. First, back up your existing wp-config.php and .htaccess files.1. Create a blogs.dir directory under /wp-content/This directory is used to stored uploaded media for your additional sites and must be writable by the web server. They should be CHOWNed and CHMODed the same as your wp-content directory.2. Add the extra lines your WordPress installation generates into your wp-config.php file.These lines are dynamically generated for you based on your configuration.Edit the wp-config.php file while you are logged in to your sites admin panel.Then just paste the generated lines immediately above /* That's all, stop editing! Happy blogging. */.

3. Add the generated mod_rewrite rules to your .htaccess file, replacing other WordPress rules.(If there isn't one, then create it.)These lines are dynamically generated for you based on your configuration.4. Log in again.Once the above steps are completed and the new wp-config.php & .htaccess files are saved, your network is enabled and configured. You will have to log in again. click "Log In" to refresh your Adminstration Panel. If you have problems logging back in, please clear your browser's cache and cookies.

Step 6: Network Admin SettingsIn 3.0, you had a new menu for Super Admin, but as of 3.1 you have an entire sub-section for Network Admin. The link can be found on the upper-right of all admin screens, by your name.

Go to the Settings panel to configure network options, and the Sites panel to manage your sites.

Things You Need To KnowHere are some additional things you might need to know about advanced administration of the blog network. User AccessBy design, all users who are added to your network will have subscriber access to all sites on your network.

Also, site admins cannot install new themes or plugins. Only the Network Admin (aka Super Admin) has that ability.

PermalinksWhile permalinks will continue to work, the main blog (i.e. the first one created) will have an extra entry of blog, making your URLs appear like domain.com/blog/YYYY/MM/POSTNAME.

This is by design, in order to prevent collisions with SubFolder installs. Currently there is no easy way to change it, as doing so prevents WordPress from auto-detecting collisions between your main site and any subsites. This will be addressed, and customizable, in a future version of WordPress.

Also note that the blog prefix is not used for static pages which will be accessible directly under the base address, e.g. domain.com/PAGENAME. If you try to create a static page in the first blog with the name of another existing blog, the page's permalink will get a suffix (e.g. domain.com/PAGENAME-2). If you create a new blog with the slug of an existing static page, the static page will not be reachable anymore. To prevent this, you can add the names of your static pages to the blacklist so that no blog with this name can be created.

WordPress PluginsWordPress Plugins now have additional flexibility, depending upon their implementation across the network.

  • Site Specific Plugins: WordPress Plugins to be activated or deactivated by an individual blog owner are stored in the plugins directory. You need to enable the Plugins page for individual site administrators from Network > Options.
  • Network Plugins: WordPress Plugins stored in the plugins directory can be activated across the network by the super admin.
  • Must-Use Plugins: Plugins to be used by all sites on the entire network may also be installed in the mu-plugins directory as single files, or a file to include a subfolder. Any files within a folder will not be read. These files are not activated or deactivated; if they exist, they are used.

Categories and TagsGlobal terms are disabled in WordPress 3.0 by default. You can use the Sitewide Tags WordPress Plugin or other similar Plugins to incorporate global tags on the portal/front page of the site or on specific pages or blogs within the network to increase navigation based upon micro-categorized content. Switching between subdomains and subfoldersIf you have had WordPress installed for longer than a month and are attempting to activate the network, you will be told to use Sub-domain sites. This is in order to ensure you don't have conflicts between pages (i.e. example.com/pagename ) and sites (i.e. example.com/sitename ). If you are confident you will not have this issue, then you can change this after you finish the initial setup.

In your wp-config.php file, you'll want to change the define call for SUBDOMAIN_INSTALL:Use SubDomains define( 'SUBDOMAIN_INSTALL', true ); Use SubFolders define( 'SUBDOMAIN_INSTALL', false );

You'll also have to change your .htaccess to the new setup. Be aware, you may have issues if you attempt this after being on one setup or the other for any length of time, so proceed with caution.

Note that per the Settings Requirements you cannot switch from Sub-folder to Sub-domain when running on 127.0.0.1 or localhost. This can potentially cause an endless loop of reauth=1 on your root site due to cookie handling.

Apache Virtual Hosts and Mod RewriteTo enable mod_rewrite to work within an Apache Virtual host you may need to set some options on the DocumentRoot.

DocumentRoot /var/www/vhosts/wordpress AllowOverride Fileinfo Options .htaccess and Mod RewriteUnlike Single Site WordPress, which can work with "ugly" Permalinks and thus does not need Mod Rewrite, MultiSite requires its use to format URLs for your subsites. This necessitates the use of an .htaccess file, the format of which will be slightly different if you're using SubFolders or SubDomains. The examples below are the standard .htaccess entries for WordPress SubFolders and SubDomains, when WordPress is installed in the root folder of your website. If you have WordPress in it's own folder, you will need to change the value for RewriteBase appropriately.

As a reminder, these are EXAMPLES and work in most, but not all, installs.

SubFolder Example # BEGIN WordPress RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] # uploaded files RewriteRule ^([_0-9a-zA-Z-]+/)?files/(.+) wp-includes/ms-files.php?file=$2 [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).*) $1 [L] RewriteRule ^[_0-9a-zA-Z-]+/(.*\.php)$ $1 [L] RewriteRule . index.php [L] # END WordPress

SubDomain Example # BEGIN WordPress RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] # uploaded files RewriteRule ^files/(.+) wp-includes/ms-files.php?file=$1 [L] RewriteCond %{REQUEST_FILENAME} -f [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^ - [L] RewriteRule . index.php [L] # END WordPress

Issues with old WPMU installs

If you installed Wordpress MU in subfolder/subdirectory (not in root folder on your server via ftp) and you have problem with image library, where thumbnails and images do not show, you may need to manually add in rewrite rules for your blogs file directories as follows: RewriteRule ^([_0-9a-zA-Z-]+/)?blogN/files/(.+) wp-content/blogs.dir/N/files/$2 [L]

Put those below the normal call for uploaded files.

Importing into WordPress NetworkWhen you've created your WordPress Network to import other blogs into, you need to look at the Migrating Multiple Blogs into WordPress Multisite article.
How do you set up wordpress multisite? - Answers (2024)

FAQs

How do you set up wordpress multisite? - Answers? ›

Setting Up Your Multisite Network

How does a WordPress Multisite work? ›

The WordPress multisite feature allows you to create a network of similar virtual sites under the umbrella of a single WordPress installation. Think of Multisite as a giant oak tree. All of the branches (in this case, the WordPress network of sites) connect to a single trunk (the original WordPress installation).

How many sites can WordPress Multisite handle? ›

How Many Websites Can I Create on WordPress? You can build as many subsites as you want in a Multisite installation of WordPress. The only limit is the amount of resources your hosting plan can comfortably support.

How do I convert an existing WordPress site to Multisite? ›

How to Move a Single WordPress Site into a Multisite
  1. Choosing a Migration Method. ...
  2. Exporting Content from the Old Site.
  3. Creating a New Site in Your Network.
  4. Installing and Activating Plugins and Themes.
  5. Importing Content to Your New Site.
  6. Migrating Widgets.
  7. Tidying Up.
  8. Migrating Into a Network Is Easier Than You Think.
Feb 14, 2022

When not to use WordPress Multisite? ›

The only way to truly separate users is with separate WordPress installations. Don't use Multisite to do development work before pushing the site into production. Migrating one site from a Multisite network is extremely complicated. Don't use Multisite if you want to ensure the security of each of your sites.

How do I get all my WordPress sites on Multisite? ›

We can retrieve list of all sites in WordPress Multisite Network by using get_sites() function. This function will return the data in array format. Please check the sample code below. $sites = get_sites(); var_dump($sites);

How do you tell if a site is a WordPress Multisite? ›

General
  1. Log into your WordPress site and you will be presented with the WordPress dashboard.
  2. In the case of multisite, on the top left corner you should be able to see options for the Network Admin and the subsequent site management as shown below.

Can WordPress Multisite have different domains? ›

Yes. The WordPress Multisite feature is a core WordPress feature that allows you to easily run multiple websites using the same WordPress installation. One aspect of this setup that many WordPress Admins like is the fact that you can use different domains for each of your websites.

What is the structure of Multisite WordPress? ›

Multisite has the same structure, core files, and code files as a standard, single install, so really, it's not much different. Updates are the same, and will be global throughout all the sites sharing it. Because everything is shared, themes and plugins are stored just once, no matter how many sites use them.

Can anyone register for WordPress Multisite? ›

Multisite User Registration

In the Network Admin area of your WordPress Admin Dashboard, you can select “Settings,” and scroll down to “Registration Settings” to allow users to register. Select “User accounts may be registered” to allow users to register as “Subscribers” to your subsites.

Can I have two websites on one WordPress account? ›

Own Multiple Sites

When you sign up for WordPress.com, you'll create your first website during the signup process. After that, you can create additional sites under the same account, although each site requires its own plan.

Is Multisite bad for SEO? ›

One of the major concerns with WordPress Multisite is duplicate content. Duplicate content can negatively impact SEO, as Google finds it difficult to differentiate pages with identical content. This risks Google not ranking your duplicate content at all, or your pages competing for the same keywords.

Is WordPress Multisite worth it? ›

One of the biggest advantages of using WordPress Multisite is centralized management. With this approach, you can manage all of your websites from one dashboard. This makes it easy to update plugins, themes, and core WordPress files across all of your sites simultaneously.

How do I create a multi store in WordPress? ›

All in all, here is a quick summary of what you need to do to create and manage a WooCommerce multistore business:
  1. Activate the Multisite Feature on WordPress to create a network of sites.
  2. Set up domains, subdomains, folders, etc. ...
  3. Activate the WC plugin.
  4. Create a store on WC and add some products to it.
Jan 23, 2024

Is WordPress multisite good? ›

There are several reasons users opt for a WordPress multisite vs. single site configuration. For businesses creating multiple websites, opting for multisite saves significant time and money. Multisite networks also consume less server space in comparison to separate installations.

Can anyone register for WordPress multisite? ›

Multisite User Registration

In the Network Admin area of your WordPress Admin Dashboard, you can select “Settings,” and scroll down to “Registration Settings” to allow users to register. Select “User accounts may be registered” to allow users to register as “Subscribers” to your subsites.

References

Top Articles
Latest Posts
Article information

Author: Allyn Kozey

Last Updated:

Views: 6181

Rating: 4.2 / 5 (43 voted)

Reviews: 90% of readers found this page helpful

Author information

Name: Allyn Kozey

Birthday: 1993-12-21

Address: Suite 454 40343 Larson Union, Port Melia, TX 16164

Phone: +2456904400762

Job: Investor Administrator

Hobby: Sketching, Puzzles, Pet, Mountaineering, Skydiving, Dowsing, Sports

Introduction: My name is Allyn Kozey, I am a outstanding, colorful, adventurous, encouraging, zealous, tender, helpful person who loves writing and wants to share my knowledge and understanding with you.