I haven’t installed a WordPress multisite in a while, so here are some notes about that.
Let’s start where everyone should (if you know what a multisite network install is): Before You Create A Network – Documentation – WordPress.org
Do you really need a network? # Do you really need a network?
The sites in a multisite network are separate, very much like the separate blogs at WordPress.com. They are not interconnected like things in other kinds of networks (even though plugins can create various kinds of interconnections between the sites). If you plan on creating sites that are strongly interconnected, that share data, or share users, then a multisite network might not be the best solution.
For example, if all you want is for different collections of web pages to look very different, then you can probably achieve what you want in a single site by using a plugin to switch themes, templates, or stylesheets.
For another example, if all you want is for different groups of users to have access to different information, then you can probably achieve what you want in a single site by using a plugin to switch capabilities, menus, and link URLs.
This guide describes how to install manually WordPress Multisite in your current WordPress installation. There are also available ready-to-run packages from BitNami.
I do want a multisite, because I want to produce distinct sets of configurations for users, while using the same plugins and themes for each site. There will be not interaction between the sites. AKA a really great use of multisite!
Types of multisite network # Types of multisite network
You can choose between several different types of multisite network depending on how you want your network to handle URLs, and on whether it will allow end users to create new sites on demand.
Different types of network have different server requirements, which are described in a section below. If you do not have full control over your server then certain types of multisite network might not be available to you. For example, you might not have full control over your server because you use a shared hosting environment. In that case you will have to negotiate the requirements with whoever operates the hosting environment.
The sites in a network have different URLs. You can choose one of two ways for the URL to specify the site:
- Each site has a different subdomain . For example:
site1.example.com
,site2.example.com
.- Each site has a different path . For example:
example.com/site1
,example.com/site2
Additionally, you can map domains like
example1.com
,example2.com
, etc, however a plugin is suggested. You can make the changes directly in the network settings, but it’s considered advanced administration.Administration managing sites
You can also choose whether or not to allow end users to create new sites on demand. Domain-based on-demand sites are normally only possible using subdomains like
site1.example.com
andsite2.example.com
. Path-based on-demand sites are also possible.The multisite installation process uses different terminology. A sub-domain install creates a domain-based network, even though you might use separate mapped domains, and not subdomains, for your sites. A sub-directory install creates a path-based network, even though it does not use file system directories. If you want to use a sub-domain install, you must install WordPress in the root of your webpath (i.e. domain.com) however it does not need to be installed in the root (i.e. /public_html/) if you choose to run WordPress from it’s own directory.
After the multisite network installation is complete, WordPress uses the terminology domain and path for each site’s domain and path in the Network Admin user interface. A super admin (that is, a multisite network administrator) can edit sites’ domain and path settings, although it is unusual to do this to established sites because it changes their URLs.
Plugins can extend the options available and help with administration. Search Plugin Directory by ‘multisite’ or click this link.
Folks will use this multisite for a specific use, and co-branding is very simplified. Therefore, all sites will be a subsite on a path (example.com/site
). I won’t have to deal with any domain nonsense.
Admin Requirements # Admin Requirements
To create a multisite network you must be the administrator of a WordPress installation, and you normally need access to the server’s file system so that you can edit files and create a directory. For example, you could access the server’s file system using FTP, or using the File Manager in cPanel, or in some other way.
You do not necessarily need any knowledge of WordPress development, PHP, HTML, CSS, server administration or system administration, although knowledge of these things might be useful for troubleshooting or for customizing your multisite network after installation.
Making note to mention that somewhere, so folks can hire me.
Server Requirements # Server Requirements
When you are planning a network, it can sometimes be helpful to use a development server for initial testing. However, setting up a development server that exactly matches your production server is not always possible, and transferring an entire network to a production server may not be easy. A test site on your production server is sometimes a more useful way to test your planned network.
In all cases, you will need to make sure your server can use the more complex .htaccess (or nginx.conf or web.config) rules that Multisite requires.
Multisite requires mod_rewrite to be loaded on the Apache server, support for it in .htaccess files, and Options FollowSymLinks either already enabled or at least not permanently disabled. If you have access to the server configuration, then you could use a Directory section instead of a .htaccess file. Also make sure that your httpd.conf file is set for “AllowOverride” to be “All” or “Options All” for the vhost of the domain. You can ask your webhost for more information on any of this.
Some server requirements depend on the type of multisite network you want to create, as follows.
I’ll be going with mod_rewrite
and subpaths, so a lot of this is simplified.
Domain-based # Domain-based
Also known as ‘Subdomain’ installs, a Domain-based network uses URLs like
http://subsite.example.com
A domain-based network maps different domain names to the same directory in the server’s file system where WordPress is installed. You can do this in various ways, for example:
- by configuring wildcard subdomains
- by configuring virtual hosts, specifying the same document root for each
- by creating addon domains or subdomains in cPanel or in a similar web hosting control panel
On-demand domain-based sites require the wildcard subdomains method. You can create additional sites manually in the same network using other methods.
Whichever methods you use, you will need to configure your DNS (to map the domain name to the server’s IP address) and server (to map the domain name to the WordPress installation directory). WordPress will then map the domain name to the site.
WordPress should be run from the root of your webfolder (i.e.
public_html
) for subdomains to work correctly. Making subdomains work from a non-root directory requires experience with Virtual Hosts and redirects.External links:
- Wildcard DNS record (Wikipedia)
- Apache Virtual Host (Apache HTTP Server documentation)
- cPanel Domains (cPanel documentation)
For some examples of how to configure wildcard subdomains on various systems, see: [Configuring Wildcard Subdomains](https://codex.wordpress.org/Configuring Wildcard Subdomains)
This could work if I had a go to method for creating new TLS certs for new domains. But this project is a tool/service-based site, so subpaths work.
Path-based # Path-based
Also known as ‘Subfolder’ or ‘Subdirectory’ installs, a path-based network uses URLs like
http://example.com/subsite
If you are using pretty permalinks in your site already, then a path-based network will work as well, and you do not need any of the other information in this section. That said, be aware that your main site will use the following URL pattern for posts:
http://example.com/blog/[postformat]/
At this time, you cannot remove the blog slug without manual configuration to the network options in a non-obvious place. It’s not recommended.
If that option is changed, it’s possible to override a bunch of the base site URLs with a subsite name in the URL. Used to burn n00bs all the time. I’m fine with that, I don’t plan to use the main site for anything; I can just make a sub-site call “About”.
WordPress Settings Requirements # WordPress Settings Requirements
When you install a multisite network you start from an existing WordPress installation. If it is a fresh install with its own domain name, then you do not need to read this section. If it is an established site, or not reachable using just a domain name, then the following requirements apply to allow it to be converted to a multisite network.
Be Aware # Be Aware
Giving WordPress its own directory works with Multisite as of 3.5, however you must make the ‘own directory’ changes before you activate Multisite.
While it’s not recommended to use www in your domain URL, if you chose to do so and plan to use subdomains for multisite, make sure that both the site address and the WordPress address are the same. Also keep in mind some hosts will default to showing this sort of URL:
For this, and many other reasons, we do not suggest you use www in your domain name whenever possible. If you plan on changing them to
domain.com
orwww.domain.com
, do so before you begin the rest of the setup for multisite, as changing the domain name after the fact is more complicated.Restrictions # Restrictions
You cannot create a network in the following cases:
- “WordPress address (URL)” uses a port number other than ‘:80’, ‘:443’.
You cannot choose Sub-domain Install (for a domain-based network) in the following cases:
- The WordPress URL contains a path, not just a domain. (That is, WordPress is not installed in a document root, or you are not using the URL of that document root.)
- “WordPress address (URL)” is
localhost
.- “WordPress address (URL)” is IP address such as 127.0.0.1.
(Note that you can create a domain-based network on your local machine for testing purposes by using your hosts file to map some other hostnames to the IP address 127.0.0.1, so that you never have to use the hostname
localhost
.)You cannot choose Sub-directory Install (for a path-based network) 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 network types for more information.)
(See wp-admin/network.php for more detail)
The link to giving WP it’s own folder starts:
Many people want WordPress to power their website’s root (e.g.
http://example.com
) but they don’t want all of the WordPress files cluttering up their root directory. WordPress allows you to install it into a subdirectory, but have your website served from the website root.
I’m not concerned by that. And this project is fresh, so we are creating a network from the beginning. Cool!
You have the ability to create a network of sites by using the multisite feature. This article contains instructions for creating a multisite network. It is advised to read the post “Before you Create a Network” first, as it contains important information about planning your network.
A multisite network can be very similar to your own personal version of WordPress.com. End users of your network can create their own sites on demand, just like end users of WordPress.com can create blogs on demand. If you do not have any need to allow end users to create their own sites on demand, you can create a multisite network in which only you, the administrator, can add new sites.
A multisite network is a collection of sites that all share the same WordPress installation core files. They can also share plugins and themes. The individual sites in the network are virtual sites in the sense that they do not have their own directories on your server, although they do have separate directories for media uploads within the shared installation, and they do have separate tables in the database. NOTE: Upgraded and can’t find the Network Admin menu?
Step 0: Before You Begin # Step 0: Before You Begin
Compared with a typical single WordPress installation a network installation has additional considerations. You must decide if you want to use subdomains or subfolders and how you want to manage them. Installing themes and plugins is different: for example, each individual site of a network can activate both, but install neither.
This guide describes how to install manually WordPress Multisite in your current WordPress installation. There are also available ready-to-run packages from BitNami.
Please read Before You Create A Network in full before continuing.
See: Let's make a WordPress Multisite! - #2 by maiki
Step 1: Prepare Your WordPress # Step 1: Prepare Your WordPress
Your existing WordPress site will be updated when creating a network. Unless this is a fresh install and you have nothing to lose, please backup your database and files.
Verify that Pretty Permalinks work on your single WP instance.
Also deactivate all active plugins. You can reactivate them again after the network is created.
If you plan to run WordPress out of its own directory, do that before activating Multisite.
This is a fresh site, so I just need to check permalinks. I’m not using any plugins yet, and I’m not running it out of it’s own directory. I’m all good.
Step 2: Allow Multisite # Step 2: Allow Multisite
To enable the Network Setup 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. */
. If it doesn’t say that anywhere, then add the line somewhere above the first line that begins withrequire
orinclude
:/* Multisite */ define( ‘WP_ALLOW_MULTISITE’, true );
You will need to refresh your browser to continue.
ssh
into the server and add that line via vim
.
Step 3: Installing a Network # Step 3: Installing a Network
The previous step enables the Network Setup item in your Tools menu . Use that menu item to go to the Create a Network of WordPress Sites screen.
To see an example of the Create a Network of WordPress Sites screen, look at Administration >Tools > Network Setup. The screen does not look exactly the same in all circumstances. The example shown is for an installation on
localhost
, which restricts the options available.Create a Network of WordPress Sites page
Addresses of Sites in your Network
You are given the choice between sub-domains and sub-directories, except when existing settings restrict your choice.
You must choose one or the other. You can reconfigure your network to use the other choice after installation, despite the advice on the screen, but reconfiguring it might not be easy.
You only need wildcard DNS for on-demand domain-based sites, despite the advice that may be on the screen.
Once more: See Before You Create A Network.
- Sub-domains — a domain-based network in which on-demand sites use subdomains
- Sub-directories — a path-based network in which on-demand sites use paths
Network Details
These are filled in automatically, but you can make changes. Server Address The domain of the URL you are using to access your WordPress installation. Network Title The title of your network as a whole. Admin E-mail Address Your email address as super admin of the network as a whole.
Double-check the details and press the Install button.
Note: The installer may perform a check for wildcard subdomains when you have not configured them yet, or when you do not need them at all. Ignore the warning if it does not apply to your network. See the Server Requirements section in Before You Create A Network for information about wildcard subdomains.
Subsites for me, and install!
Step 4: Enabling the Network # Step 4: Enabling the Network
To enable your network, follow the instructions on the Create a Network of WordPress Sites screen. The instructions that you see are customized for your installation. They might not be the same as the examples you see here.
Populated settings when creating a network of sites
Back up your existing
wp-config.php
and.htaccess
files, unless this is a fresh install and you have nothing to lose.There are two steps: 1. Add the specified lines to your
wp-config.php
file The extra lines go just after where you added the line in Step 1: Prepare Your WordPress. 2. Add the specified lines to your.htaccess
file If you do not have a.htaccess
file, then create it in the same directory as yourwp-config.php
file. If you ALREADY have a.htaccess
file, replace any existing WP lines with these new ones. In some cases you might also have to add Options FollowSymlinks at the start of the file.After completing these steps, log in again using the link provided. You might have to clear your browser’s cache and cookies in order to log in.
Copied those lines to wp-config.php
and .htaccess
, logged out and logged back in… it works!
Step 5: Network Admin Settings # Step 5: Network Admin Settings
At the left of your WordPress toolbar, My Sites is now the second item. There, all your sites are listed, with handy fly-out menus, as well as a Network Admin menu item. Under Network Admin you can use the Dashboard item to go to the Network Dashboard screen.
Go to the Settings Screen to configure network options, and the Sites Screen to manage your sites.
For more information, see: Network Admin
Upgraded and can’t find the Network Admin menu?
Step 6: Administration # Step 6: Administration
There are some additional things you might need to know about advanced administration of the network, due to the additional complexity of a Multisite. Even if you’re familiar with WordPress, the location and behavior of Multisite Network Administration can be confusing.
Read Multisite Network Administration for more information.
For help troubleshooting:
Related Articles # Related Articles
There’s the rest of the article, but there isn’t anything to do at the moment. I need to make some decisions, so that will be the next discussion.