HOW TO INSTALL/SET UP A WORDPRESS MULTISITE

HOW TO INSTALL/SET UP A WORDPRESS MULTISITE

In this tutorial we explain how you can install and set up a WordPress multisite to build a network of websites. We assume that you already installed a WordPress Single Site. Moreover we assume you have FTP access to the directory of your WordPress installation, as you need to change some files.

Table of Contents

1. Install WordPress Multisite – the Requirements

Before you start to install the WordPress multisite, please make sure that:

  • You already have a WordPress installation
  • Pretty Permalinks are activated. This means your URLs should not look like this http://example.com/?p=2345, but rather like this http://example.com/my-page
  • All plugins are deactivated
  • Important: you have a backup of your WordPress installation
  • You have FTP access to your WordPress installation

2. Allow Multisite in wp-config.php

The first step is to activate the Multisite feature in the file wp-config.php.

  1. Set up a FTP connection to your website.
  2. Open the file wp-config.php, which is is located in the main directory of your WordPress, and add the line
    define('WP_ALLOW_MULTISITE', true);
    above the line:
    /* That's all, stop editing! Happy blogging. */
    Define WP_ALLOW_MULTISITE in wp-config.php to enable the Multisite feature.
  3. Save the file wp-config.php.

Now you enabled the Multisite feature in your WordPress installation. But you haven’t finished yet. The next step is to install the network.

3. Install the WordPress Network

  1. Refresh the page in your browser and log in to your website.
  2. In the left sidebar under Tools you will find the menu tab Network Setup, where you can configure your WordPress Multisite.Install a WordPress Multisite – Settings page “Create a Network of WordPress Sites”
  3. Decide whether you want to use subdomains for the sites in your network (e.g. site1.example.com) or whether you want to have them installed in subfolders (e.g. example.com/site1).  This setting affects all the sites in your network, you cannot change that later on.  Do you need a site to be mapped to a top level domain (e.g. mydomain.com)? This is possible with domain mapping.
  4. Enter a name for your network in the field Network Title in the section Network Details.
  5. Enter the site admin’s e-mail address.
  6. Click the Install button.

4. Add some code to wp-config.php and .htaccess

WordPress will now provide you with two snippets of code, which you need to add to the wp-config.php and .htaccess files. Both files are located in the root directory of your WordPress.

  1. Set up a FTP connection to your website.
  2. Add the first code snippet to your wp-config.php directly above the line
    /* That's all, stop editing! Happy blogging. */
    The snippet looks like this, but adapted to your own site:
    define('MULTISITE', true);
    define('SUBDOMAIN_INSTALL', true);
    define('DOMAIN_CURRENT_SITE', 'My Website');
    define('PATH_CURRENT_SITE', '/');
    define('SITE_ID_CURRENT_SITE', 1);
    define('BLOG_ID_CURRENT_SITE', 1);
  3. Add the second code snippet to the .htaccess file and replace other WordPress rules.
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]

    # add a trailing slash to /wp-admin
    RewriteRule ^wp-admin$ wp-admin/ [R=301,L]

    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^ - [L]
    RewriteRule ^(wp-(content|admin|includes).*) $1 [L]
    RewriteRule ^(.*\.php)$ $1 [L]
    RewriteRule . index.php [L]
  4. Save both files.

 

5. Menu network administration and the network settings

When you changed the wp-config.php and the .htaccess, log into your WordPress admin area again. In the upper admin bar, you now see the new menu Network Admin. It’s displayed always, so you can always enter the admin area of the network, no matter on which site of your network you are. We take a look at the sub menues later on.

Below the network administration, all sites of the network are listed to which you were added. By clicking on the names, you enter the backends of these sites.

The menu Network Admin of a WordPress multisite
The menu Network Admin of WordPress multisite

And here’s the explanation of the menu tabs in the network administration:

  • Dashboard: Here you can find the widget to add new users and new sites to your network.
  • Sites: On this tab, you can see all sites of your network – similar to the posts and pages. By moving the cursor over the websites, you see for example links to edit, display the dashboard, view, delete, archive or deactivate the sites. Note that you have fewer functions for the main page of your network, as this one always needs to exist and you cannot delete it.
  • Users: Here you can administer the users of your network. In contrast to a single site installation, you can assign the super admin user role. The super admin has access to all sites and can make changes within the whole network. If you want a user to have access to the sites of your network, you need to add the user to each site via the user administration of the sites.
  • Themes: The theme administration. Here you can install and uninstall themes and activate or deactivate them for the whole network.
  • Plugins: Here you can find all installed plugins. You can add new plugins or delete them, you can activate or deactivate them for the whole network.
  • Settings: On this tab you can find and edit the basic settings for your site, for example: the network name and the admin E-Mail address, you can allow user registrations, add new users to the site admins, you can make the themes and plugins menu available for site admins or set the standard language of your sites.

6. Add a new website to the network

A WordPress multisite with only one website doesn’t really make sense. To a WordPress multisite, you can add as many websites as you want – always and any time, so, it needn’t be at the beginning. To enhance your website with a new site, take the following steps:

  1. Go to My Sites → Network Admin → Sites and click Add new.Add a new website to a multisite
  2. Enter the desired website address. In this case, we decided for a network with sub directories. The domain is already given, we just add the sub diretory.Settings for the new website in the multisite network
  3. Define a title of the website. This one is displayed at several positions in your network, for example in the backend as website name in My Sites, but maybe also in the frontend or in meta data like the page title.
  4. Choose a language for the new website.
  5. Choose the admin e-mail address which must be different than the one for the whole network. If there is no user with this e-mail yet, a new user with admin role for this site will be created.
  6. Click the button Add Site. Your new site is to be created and will be displayed in My Sites  → Network Admin → SitesHowever, in order to let others than the current admin administer this new site, you need to add them as user with admin role to this site.

7. Install Plugins and Themes in the WordPress multisite

Install or uninstall plugins or themes in a WordPress multisite network is something only the super admin can do. The site admins within the network can only activate or deactivate them. Well, and site admins can only activate and deactivate plugins in case the super admin checked the box Enable administration menus in the network administration in Settings → Network Settings.

Enable administration menus
Enable administration menus to allow admins to enable/disable plugins.

You can find the plugins administration for the whole network under Network Admin → Plugins, the themes administration under Network Admin → Themes.

Install plugins in a multisite
Install plugins in a multisite and make them available for the whole network

For the site admin, the whole thing looks like the next picture.

The plugins administration as site admin in a WordPress multisite
The plugins administration as site admin in a WordPress multisite

Hint: The admin can activate and deactivate plugins, but he cannot install or uninstall them.

For one of the plugins in our example you can read Network Only. This means the plugin is available only for all sites or for no site. Moreover, it’s the super admin only who can set the settings of this specific plugin, you need to make them in the network administration.

You can find further help to set up your multisite in our documentation category WordPress Multisite 1×1. In case you are setting up a multilingual website, take a look at: MultilingualPress getting started.


– And now about local –


A WordPress multisite can be the answer to managing multiple WordPress websites easily. Once you install WordPress multisite on your server, there’ll be no need to replicate administrative tasks on the backend of a number of individual sites. The sites can all be managed from a single dashboard.

Multisite dashboard

What is WordPress multisite exactly? A multisite is a network of two or more sites that operate off a single WordPress install. All the sites on a multisite setup will use the same WP database, WP directory and WP configuration file. In such a setup, the management of the WordPress install is in the hands of a “Network Administrator”. And the administration of the individual sites on the network is left to the care of the respective Site Admins.

How to Install WordPress Multisite on a Local Server

To begin with, make certain that you have administrator rights to access your computer’s file system. This is because you’ll need privileges to create directories and edit files.

We’ll presume that you’ve installed WordPress on your computer already. But just in case you need help with this, you can always look into our earlier guide.

Note. This is a required step. In order to follow through and install WordPress multisite on your local computer, you first need to have a standard WordPress installation running. Again, please check out our other guide – it’s a step-by-step tutorial, quite easy to follow.

To install WordPress multisite locally and create a network of any number of sites on your own computer, follow these steps:

Before you start:

Choice of URL: Now’s the time to decide whether to install additional sites in a sub-directory or under a sub-domain. It’s important to realize that you cannot change this later.

  • A sub-domain URL for the individual sites will read: site1.YOURSITE.comsite2.YOURSITE.com
  • A sub-directory URL for the individual sites will read: YOURSITE.com/site1YOURSITE.com/site2

On a live server, you can install both under a sub-domain or a sub-directory. Installing a sub-domain on a local host is a little more technical. It involves configuring the XAMPP application to create a sub-domain and then registering it in the operating system software files. In this post, we’ll deal with only a sub-directory installation on the local server.

Enabling the Multisite Feature

1. Adding the multisite feature:

Firstly, open your wp-config.php file and find the line, ‘/* That’s all, stop editing! Happy blogging. */‘ towards the end. Just above this phrase, add this piece of code:

define('WP_ALLOW_MULTISITE', true);

Then save and close the file.

2. Setting up your network:

At this point, you should see a new item in your WordPress dashboard. Specifically, go to Tools > Network Setup. Once there, choose either sub-domains or sub directories.

If you’re going with a sub-domain network on a live server, you’ll need to obtain something called a wild card DNS from your hosting service provider. Since, we’re only doing a sub-directory install on a local server, you do not need any permissions. Fill in the details and then click on install.

Install WordPress Multisite

A few lines of code will be generated, and you need to add them in your wp-config.php file and in your .htaccess file.

After inserting the code, save the files. With this, WordPress Multisite is now successfully installed.

To access your Network Admin Dashboard, you’ll have to login afresh.

3. Adding sites to your network:

At this point, you can start creating sites and adding them to your network by clicking through My Sites > Network Admin > Sites > Add New:

Fill in the details for the individual sites, such as Address, Title and email. Then Click Add Site.

In the same manner, you can add as many sites as you want. You’ll see all the sites in your Network under All Sites.

4. Add themes and plugins:

With multisite in place, a Network Admin can install themes and plugins on multisite. These themes and plugins can be activated across the entire network, or selectively on a per-site basis.

When To Use / Install WordPress Multisite?

In general, multisite works well for a group of sites that fall into a hierarchical framework. Think government and its various departments, a university and its different schools, any national / world organization and its numerous chapters.

It’s also a good fit for a group of related sites that share common resources. For instance, a network of parallel or allied blogs.

To understand this better, check out Harvard Blogs, a free service for the benefit of the Harvard community. Anyone with an email at harvard.edu can create a blog on this WordPress install. Bloggers can simply concentrate on creating and managing content for their blogs, while enjoying the common resources offered by multisite – themes, widgets, multimedia material, spam protection and more.

In short, WordPress multisite helps you manage all your blogs from a single dashboard. You’ll need to install themes, plugins and updates just once and then activate them as required. Not only that, you’ll also save on time and server space. And, if you’re up to handling the technicalities, you can even monetize the network by offering to host other sites on your network.

When WordPress Multisite is Not The Solution?

Does all this mean that WordPress multisite is the best solution for anyone who runs multiple blogs? Of course not. While multisite offers great convenience, it does have some downside to it as well. Individual sites are restricted in their choice of themes, plugins and hosting service. Moreover, not all plugins are multisite compatible, and this can somewhat limit your choice of plugins.

Again, any downtime at the server end will cause the entire network to go down. And, if it happens that any one site on the network experiences a spurt in traffic, it may affect the speed of the other sites in the network.

It’s also important to note that detaching a site from the network or migrating the whole multisite setup sometime in the future may require professional help. And therefore, switching to a multisite arrangement should be done after much careful thought.

Install WordPress multisite: To Conclude

You can use a local multisite as a testing site for any changes to your WordPress install or to test compatibility of any new themes or plugins. You can also work on any project locally, before you push it up to a live server.





Source: multilingualpress.org

Comments

comments

Close Menu
Show Buttons
Hide Buttons