WordPress Multisite

From DreamHost
(Redirected from WordPress MU)
Jump to: navigation, search

Overview

WordPress Multisite is a feature of WordPress that allows you to create multiple virtual sites that share a single WordPress installation. This allows users to create their own sites as subdomains of your primary site. For example:

  • example.com/site1
  • example.com/site2
  • example.com/site3

You can also configure your multisite to only allow the administrator to create new sites. This can be useful for a business with different departments. For example:

  • example.com/sales
  • example.com/products
  • example.com/support
Important icon.png Important:
  • WordPress Multisite support is NOT PROVIDED BY DREAMHOST.
  • If anything on your multisite installation is not functioning, you must troubleshoot it yourself or hire a developer.
  • Multisite is not for WordPress beginners. You should already know how to use WordPress before considering using Multisite.
  • Users should have basic knowledge of PHP, MySQL, how to edit files on the server, and how to review error logs in case you must troubleshoot it yourself.


Should you use WordPress Multisite?

View the before you create a network article from WordPress for further information.

When to NOT use Multisite

Multisite isn't a good choice if you want:

  • various users to collaborate on a single project
  • various users to blog together
  • a site where data or users are shared
  • different users to see different pages (a plugin can be used instead)
  • different pages to look different (a plugin can be used instead)

When to use Multisite

Multisite may be a good choice if you:

  • want to create virtual sites that are independent of each other
  • want each user to have control over how their data is presented
  • want to allow users to create their own site
  • you are proficient in PHP, MySQL, and reviewing logs for errors
  • you are confident in providing support for (potentially) many users
  • want to give each blog a subdomain or a subdirectory
  • wish to be the single network administrator over all sites in a network
  • wish to update all sites in a single step

Types of Multisite

There are two ways you can set up your multisite:

  • Subdomains, or
  • Subdirectories

Subdirectory Multisite

This option creates subdirectories in the following format:

  • example.com/site1
  • example.com/site2
  • example.com/site3

Subdomain Multisite

This option creates subdomains in the following format:

  • site1.example.com
  • site2.example.com
  • site3.example.com
Important icon.png Important:
  • The subdomain option is only available on a VPS or Dedicated server. This is because Wildcard DNS is required for this configuration. If you wish to use Multisite on a shared server, you must use the subdirectory option.
  • DO NOT use the panel to enter an asterisk * as a CNAME record. This does not work and will cause tremendous problems down the line.


Third option for advanced users

It's also possible to map a separate domain to your network. For example, instead of having example.com and example.com/site1 you have example.com and site1example.com.

In order to do this, you need a plugin called WordPress MU Domain Mapping.

How to configure Multisite

Follow each step below in order. Make sure to not skip any steps as this may cause your installation to not function properly.

Preparing your environment

Here's a recommended checklist of action items you should take before installing WordPress Multisite:

  1. Make sure WordPress is already installed and operating on your website. You can use the One-Click install option in your panel.
  2. Backup your data before making any changes. Be sure to backup both your web server files in addition to your database. The following article describes how to do this:
  3. Test your current Permalinks. Make sure they are functioning correctly.
  4. Deactivate all plugins.
  5. Open your wp-config.php file, and then add the following line above /* That's all, stop editing! Happy blogging. */.
    /* Multisite */
    define( 'WP_ALLOW_MULTISITE', true );
    

Installing WordPress

  1. Log into your WordPress site.
    01 Multisite.png
  2. Click the 'Tools' category on your left menu.
  3. Click the 'Network Setup' option.
    02 Multisite.png
  4. Select either subdomains or subdirectories.
  5. Confirm all details, and then click the Install button.
    The following wp-config.php and .htaccess instructions appear on this page:
    03 Multisite.png
  6. Add the lines to your wp-config.php and .htaccess files.
    • Copy over any current data in your .htaccess file.
  7. Click the 'Log in' link at the bottom of the page to log into your new Multisite installation..
    The 'My Sites' menu item now appears on the top left of your dashboard:
    04 Multisite.png
  8. Click 'My Sites'.
    After you click 'My Sites', the following drop-down submenus appear:
    • Network Admin (Use this for network administration)
    • My Multisite (This is the original site name)
Note2 icon.png Note:

Visit the following article for further administration details of your new Multisite.


How to add sites

Adding sites manually

  1. Open WordPress.
    05 Multisite.png
  2. From the top menu, select 'My Sites > Network Admin > Sites'
  3. On the next page, click the Add New button.
    06 Multisite.png
  4. Enter the following fields:
    • Site Address – The subdirectory the virtual site is created under
    • Site Title – The new administrator can change this later
    • Admin Email – Email of the person who will own this site
  5. Click Add Site.
Note2 icon.png Note:

An email is sent to the new user with their login password, and they can then log into their site at:

  • example.com/sitename/wp-login.php


Letting users create their own sites

  1. Open WordPress.
    07 Multisite.png
  2. In the network dashboard, click 'Settings > Network Settings'
    08 Multisite.png
  3. Under the 'Registration Settings' select the following options:
    • 'Logged in users may register new sites.'
    • 'Send the network admin an email notification every time someone registers a site or user account.'
    New users can then create pages at example.com/wp-signup.php.

How to add users

Users that have already signed up to your site can create a new site within your network at example.com/wp-signup.php.

After a site is created, the new site administrator can log in at example.com/sitename/wp-login.php.

Adding new users manually

At first, only the network administrator can add new users to the master list. It's easier to let the site administrator add their own users.

  1. Log into your Multisite as the network administrator.
  2. Navigate to 'Settings > 'Network Settings'.
  3. Check the box titled 'Allow site administrators to add new users to their site via the "Users → Add New" page.'
  4. Scroll down and click the Save Changes button.

When the site administrator logs into their dashboard, they now have the options to 'Add New User' in addition to 'Add Existing User'.

Allowing user registration

  1. Log into your Multisie as the network administrator.
  2. Navigate to 'Settings > 'Network Settings'.
    09 Multisite.png
  3. Enable the option titled 'Both sites and user accounts can be registered'.
  4. Scroll down and click the Save Changes button.
    A 'Register' link now appears on your site's homepage:
    10 Multisite.png
  5. Click the 'Register' link to allow the creation of a user account or a new site.

Troubleshooting

  • If things go wrong, try looking up your problem on the WordPress Support Forum for Multisite. If you can't find an answer, ask it there. Be sure to note any debugging information before posting to the forums.
  • Make sure that you have created the domain to work without 'www', which you can do on the (Panel > 'Domains' > 'Manage Domains') page.
  • Make sure you installed the software without the 'http://www' in the domain name if you are using subdomains.
  • Did you accidentally create a subdomain install (on a VPS or Dedicated server) unintentionally/without contacting support to create a wildcard? If so, dump your database, and then start over. Or, contact support and ask for the wildcards to be put in place.
  • If you run into trouble, the first place to look is within the server's error logs.
  • Be sure to search the forums with keywords covering your issue. Chances are someone has already run into the problem you are having.
  • If you are using the domain mapping feature, you need to configure a Unique IP; otherwise, Apache won't recognize the request.

See also