61
WordPress Multisite 101 How to create a network without tearing out your hair. Mika Epstein & Andrea Rennick 4th Edition

WordPress Multisite

Embed Size (px)

DESCRIPTION

How to install wordpress multisite and how to use it.

Citation preview

WordPress Multisite 101

How to create a network without tearing out your hair.

Mika Epstein & Andrea Rennick

4th Edition

WordPress Multisite 101

How to create a network without tearing out your hair.

Self Published

Fourth Edition

Copyright © 2012-2013 Mika Ariela Epstein

This ebook is released under a Creative Commons Attribution-Noncommercial-ShareAlike license, which lets you share it, remix it, and share your remixes, provided that you do so on a noncommercial basis. You can give it away, but please don’t sell it. Putting it up on your website where you have ads, or using it in your class is fine. Putting it behind a paywall is not.

http://creativecommons.org/licenses/by-nc-sa/3.0

WordPress Multisite 101

http://halfelf.org/ebooks/wordpress-multisite-101/

While this ebook is provided free of charge, you are encouraged to pay what you feel this book is worth. A suggested donation of $6 can be made at PayPal or WePay:

https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=3ZUMMSVVCXEMA

https://www.wepay.com/donations/ebook-wp-multisite-101

Code LicensingAll code samples, examples, snippets or otherwise on this blog are,

unless explicitly otherwise noted, licensed under an GPL2 (or later) license:

This software is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This plugin is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied

warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

AcknowledgementsThis book wouldn’t be possible without a very patient family, but also

without WordPress itself. Without the amazing variety of configurations found on the WordPress forums, IRC and email list, as well as the hundreds of people who’ve just had one, odd little question, this information might have been lost forever.

................................................................................Introduction 10

.......................................................................What Is Multisite? 12

...................................................When You Install WordPress... 14

.....................................................Before You Activate Multisite 16

...................................................................Creating A Network 19

....................................................................................................Allow Multisite 19

.........................................................................................Enabling the Network 20

......................................................Basic Configuration Options 23

...........................................................................................Operational Settings 24

................................................................................................New Site Settings 25

...................................................................................................Upload Settings 26

...........................................................................Managing Sites 27

......................................................................................................Add New Site 27

.........................................................................................................Listing Sites 28

.................................................................Editing, Deleting and Archiving Sites 28

.........................................................................Managing Users 31

.................................................................How to add new users to the network 31

............................................................................How to add new users to a site 32

......................................................................How to add existing users to a site 33

..................................................................How to add users to all or some sites 34

......................................................................How to make a new Super Admin 34

.............................................................................................How to delete users 35

.......................................................................Managing Plugins 36

.................................................................................................Installing Plugins 36

...............................................................................................Activating Plugins 36

...................................................................Must-Use Plugins (aka MU Plugins) 37

.......................................................................How Should I Activate A Plugin? 37

..................................................................................................Deleting Plugins 37

.....................................................................Managing Themes 39

................................................................................................Installing Themes 39

..........................................................Network Enabling and Disabling Themes 39

........................................................................Enabling A Theme For One Site 40

...................................................................................Change the default theme 40

.................................................................................................Deleting Themes 41

...................................................................................................Editing Themes 41

....................................................What Your Users Must Know 42

....................................................................................How Do Users Sign Up? 42

......................................................................How Do Users Create New Sites? 43

.....................................The Difference Between A Blog and A Multisite Blog? 44

............................................................................................FAQ 46

...........................................Where are my sites? I don’t see them on my server! 46

........................................................................................Where are my images? 46

....................................All my images upload to files, but there’s no files folder! 46

......................................................Can I make an existing site into a Multisite? 47

....................................................Why is the theme not working on my subsite? 47

.................................................................How big is my database going to get? 47

.....................................................................How big is my server going to get? 48

................................................................Will Multisite make my server slower? 48

...............................How do I know which plugins are safe to use on Multisite? 48

.................................................................Can I install Multisite in a subfolder? 48

.........................Can I use ‘giving WordPress it’s own directory’ with Multisite? 48

.........................................Can I make all my sites use the same media library? 48

...................................................Can I make all my sites use the same content? 49

....................................................................I need more help! Where can I go? 49

........................................................................Advanced Topics 50

...................................................................................Go back to a single install 50

..................................................................................................Exporting A Site 51

..........................................................................................Moving your network 52

..........................................................................Allowing More Media Uploads 52

......................................................................................Pre-Configuring Plugins 53

..............................................................................................Restricting Plugins 53

....................................................................Managing users across the network 54

..............................................................................................Mapping Domains 54

..............................................................................................Multiple Networks 56

......................................................................................Splitting Your Database 56

..........................................................Change images to use the new ‘3.5’ style? 56

..............................................Removing ‘Blog’ from the URL of your mainsite 57

......................................................................Plugin Suggestions 59

....................................................................About The Authors 61

IntroductionWordPress is a well known blogging/CMS web application, popular for

it’s ease of use. Once a user gets over the initial hurdle of mastering a new tool, they can configure a site in a dizzying array of ways.

This eBook is intended to help you install WordPress, configure Multisite, and map domains on a Linux server running Apache. If you’ve never installed WordPress before, there will be some hurdles along the way, as Multisite is notably more complicated than running a single, stand alone, WordPress instance.

We will not be discussing how to install WordPress, nor how to find a host, set up a database or any other basic webmastering skills. If you have never attempted to run a website before, Multisite is like trying to master the high dive and learn to swim at the same time. You can do it, but you’re making things very hard for yourself.

Furthermore, this book will not delve into wether or not you should use Multisite. No one can really answer that question for you, so you should take the time to research what Multisite is and is not before you start.

PrerequisitesFor this book to be useful, you should already have mastered (or

become familiar with) the following:

1. You already know how to install WordPress.If you’re starting from complete zero and know nothing about how to install WordPress, start with that and then come back to Multisite.

2. You already know how to access the files on your server.Be it via SFTP or SSH or even a File Manager on your host’s control panel, you must know how to edit the files on your server.

3. You know how to access your database.WordPress uses a database to store the content of your posts, as well as plugin settings and other site specific variables. If you don’t have

access to the database, via a tool like phpMyAdmin, you will have issues debugging.

4. You’re not afraid to open up files and look at them or edit them.One of the troubleshooting techniques this document will touch on requires you to be able to open up the WordPress files and edit them.

5. Familiarity with your server’s error logs.A good webhost can help in this respect, but knowing where the error log is will be invaluable. If you don’t know, you can always ask them.

6. You know how to turn off all plugins, and use the default theme.The first step of WordPress troubleshooting is to do that. If you can’t (or won’t), there will be complications.

Chapter 1

What Is Multisite?As of the release of WordPress 3.0 (17 June, 2010), WordPress has

included a new feature known as ‘Multisite.’ Formerly, Multisite was separate product called “WordPress Multisite” or WPMU for short. The two were integrated and now allow users to seamlessly transition from running one WordPress install to many, without having to install multiple instances of WordPress!

Multisite allows you to create additional blogs off your main install, either as subdomains or subfolders. We call this a Network and the blogs are referred to as Sites. When you use Multisite, there is one install of all your themes and plugins, as well as only one database.

A WordPress Network is best thought of as a way to maintain multiple separate sites. Each site exists in it’s own bubble, with users, plugins, and themes all configured per-site. While it is possible to share content, this is considered an ‘advanced’ feature.

For a good example of what a WordPress network looks like, go check out http://wordpress.com - They have multiple separate sites, all named ‘example.wordpress.com’ or via a mapped domain. Each site is separate, with it’s own users, design, etc. When you use Multisite, the out-of-the-box settings will create sites similarly. While code is shared between sites, configurations are not.

Special TermsFor those familiar with WordPress, there are a few additional terms

that are used with Multisite.

Super Admin - A super admin, also known as the Network Admin, is a user who has access to the entire network, can add and delete sites and users, install themes and plugins, and basically do whatever they want. This access is automatically granted to the account you specify when you activate Multisite. While you can add others later, you should be very careful with whom you permit this access.

http://halfelf.org/ebooks/wordpress-multisite-101/! Page 12 of 61

Network - The ‘network’ refers to your collection of sites.

Sites - A site is a blog, though as you don’t have to have your site act like a blog, WordPress uses the more generic term here.

Main Site - Your main site is the first one you installed, normally found at http://example.com and, in the database, has the ID of 1.

Sub Sites - All additional sites on your network will be referred to as sub sites, regardless of if you are using subdomains or subfolders.

http://halfelf.org/ebooks/wordpress-multisite-101/! Page 13 of 61

Chapter 2

When You Install WordPress...You should already know how to install WordPress, however there are a

few ‘gotchas’ to be aware of.

For the purpose of this tutorial, we are assuming your HTML folder on your server is called /public_html/ - This folder is also called the ‘root’ of your website. Depending on your server, this can be named differently. A popular name is also www.

If you install in a directory and run it from ‘root’, configure it before you turn on Multisite

One of the most popular things to do is to install WordPress in a folder off of the HTML root - for example in /public_html/wordpress/ - but use the forward facing URL of http://example.com instead. 1

As of WordPress 3.5, you can do with with Multisite. Simply install WordPress in the subfolder and set it up to run from root before you create your subsites. If you decide to do this after the fact, it can be done, but you’ll need to manually edit your database.

You cannot end your Database Prefix with a numberThe default option is to use the prefix of wp_ which works just fine.

Naming your prefix wp1_ or, worse, wp1 (without an underscore) will cause conflicts with the numbering structure WordPress uses for per-site tables.

You should not use www in your URLA lot of people complain about this. The simple fact is that any well

built server will automatically redirect www.example.com to example.com seamlessly. By removing it from our install, we avoid any possible conflicts with subdomains. Your SEO will not be impacted.

Making your address URLs look like this is the best way to go:

http://halfelf.org/ebooks/wordpress-multisite-101/! Page 14 of 61

1 See http://codex.wordpress.org/Giving_WordPress_Its_Own_Directory for directions on how to do that on a single install of WordPress.

Test Pretty PermalinksBefore you turn on Multisite, make sure you can use Pretty Permalinks.

This essentially tests your server’s ability to use mod_rewrite, which is that cool thing that translates URLs from http://example.com/?p=1 to http://example.com/hello-world/

Simply put, if pretty permalinks don’t work, Multisite will never work.

http://halfelf.org/ebooks/wordpress-multisite-101/! Page 15 of 61

Chapter 3

Before You Activate MultisiteWith WordPress up and running, now is the time to turn on Multisite!

But wait… We’ve done the legwork to make sure our URLs won’t cause problems, and we know that mod_rewrite works. What’s left? There are some decisions to be made before you activate Multisite, such as...

Subdomains vs SubfoldersA subdomain install means that your sites will look like this:

•Main site: http://example.com/

•Sub Site #1: http://site1.example.com/

•Sub Site #2: http://site2.example.com/

A subfolder install means your sites will look like this:

•Main site: http://example.com/

•Sub Site #1: http://example.com/site1/

•Sub Site #2: http://example.com/site2/

In addition, if you use a subfolder install, the post URLs on your main site will have the slug /blog/ prepended to them, causing them to look like this: http://example.com/blog/2012/03/hello-world/

At this time, you cannot easily customize that slug or remove it.

There is no SEO benefit to using subdomains or subfolders, and you can map a domain name to either install, so the decision is purely cosmetic.2

Wildcard SubdomainsIf you want to use subdomains, most people suggest activating

Wildcard subdomains if at all possible. This will allow you to create a new subdomain site and have it automatically function without any manual

http://halfelf.org/ebooks/wordpress-multisite-101/! Page 16 of 61

2 See http://www.mattcutts.com/blog/subdomains-and-subdirectories/ for an explanation

intervention. You can still manually create subdomains if you want, of course.

There are two steps that need to be completed for this to work.3

First up, in Apache, there needs to be a line in the domain’s virtual hosts section as follows:

ServerName yourdomain.com

ServerAlias yourdomain.com *.yourdomain.com

DocumentRoot /home/yourdomain/public_html/

ServerAdmin [email protected]

The Server Alias line with the *.yourdomain.com is what controls this. If you do not have access to change this, ask your webhost for support. More and more hosts are enabling this by default.

Second, you must make sure your DNS record is correctly configured for wildcard subdomains. Most are, by default, however you may need to add in a line like this:

*. IN A YOURIPADDRESS

That will redirect all requests back to your main install.

If you’re using cPanel (a popular control panel for webhosts), it’s generally as simple as making a subdomain named *

This takes care of both the DNS and the Virtual Host.

http://halfelf.org/ebooks/wordpress-multisite-101/! Page 17 of 61

3 Directions modified slightly from http://wpmututorials.com/how-to/enabling-wildcard-subdomains/

If you’re using Plesk, it gets a little more complicated, and you should ask your webhost for help.

RestrictionsTo expand a little on the previous chapter, there are specific situations

in which you cannot create a network. When you install Multisite, you start with a basic WordPress install. With a fresh install on it’s own domain, there are few additional concerns, however sometimes people want to install a ‘test’ Multisite on their localhost. When you do that, there are some additional concerns.

You cannot create a network in the following cases:

• "WordPress address (URL)" uses a port number other than ':80', ':443'.

In addition, you cannot choose subdomains 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.

It is possible to switch between subdomain and subfolder installs at a later date, however you will need to be comfortable with editing your database to do so, and it’s not recommended.

http://halfelf.org/ebooks/wordpress-multisite-101/! Page 18 of 61

Chapter 4

Creating A NetworkNow we’re ready to go!

ALLOW MULTISITETo 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 with require or include:

define('WP_ALLOW_MULTISITE',true);

It should look something like this:

Making this change activates the Network Setup.

Network SetupLook under ‘Tools’ where you’ll see a new menu item called Network

Setup.

http://halfelf.org/ebooks/wordpress-multisite-101/! Page 19 of 61

Go to that screen and you will be greeted by a welcome message and a few questions. If, at this point, you still have www in your domain name, it’s the time to go back, remove that line from your config and then go back and edit the site and home URLs.

Select the type of network you want. Then review the Network Details section

Make sure you put the email of your admin user for the email address. This user will become the Super Admin and have superuser access to the entire network. This is different than a site admin, but we’ll get to that a little later on.

Once you press save, you’ll be brought to a new screen with three steps.

ENABLING THE NETWORKYou must complete these steps before continuing.

Add More Lines to wp-config.php

http://halfelf.org/ebooks/wordpress-multisite-101/! Page 20 of 61

You’ll need to add these lines to your wp-config.php, right below where you added that first line. Do not delete that first line! It looks a lot like the first line in the new section, but it’s not the same!

define('MULTISITE', true);

define('SUBDOMAIN_INSTALL', true);

$base = '/';

define('DOMAIN_CURRENT_SITE', 'example.com');

define('PATH_CURRENT_SITE', '/');

define('SITE_ID_CURRENT_SITE', 1);

define('BLOG_ID_CURRENT_SITE', 1);

You’ll notice that true is bolded. If you’re using subdomains, this is true. If you’re not, that will be false. Remember, that is an example of the output, yours may be different. Always copy from what your WordPress install has.

Update your .htaccessThere are two main versions of .htaccess for Multisite, depending on

if you chose subfolders or subdomains.

Since you’ve tested your pretty permalinks already before turning on Multisite, your .htaccess should contain this:

# BEGIN WordPress

<IfModule mod_rewrite.c>

RewriteEngine On

RewriteBase /

RewriteRule ^index\.php$ - [L]

RewriteCond %{REQUEST_FILENAME} !-f

RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule . /index.php [L]

</IfModule>

# END WordPress

http://halfelf.org/ebooks/wordpress-multisite-101/! Page 21 of 61

If it does, delete it. If you have anything else in your .htaccess you can keep it, but make sure to remove the old WordPress lines, and put these new ones in at the very bottom of your .htaccess file. Remember, WordPress’s calls always go on the bottom!

‘Reboot’Once you’ve done all that, log out of WordPress and then log back in. You may need to clear your browser’s cache to make things work. Once you log back in, you should see the new My Sites menu on the toolbar.

http://halfelf.org/ebooks/wordpress-multisite-101/! Page 22 of 61

Chapter 5

Basic Configuration OptionsThe big question you have left is ‘Now what do I do?’

By default, no one can register an account on your network and no one (save you, the Super Admin4) can make new sites. There are additional limitations on who can see plugins, who can upload files and so on. Most people want to tweak those before opening their site to the public.

The Super Admin section has its own dashboard, found at http://example.com/wp-admin/network/ and it’s there you’ll be able to start configuring your network.

Very similar to the normal dashboard, the ‘Right Now’ section lists how many users and sites you have, with handy links to create new ones. We’ll get to that in a minute.

Network settings has the majority of the basic configuration you’ll want to edit. You can get there by going to the Settings menu, and opening Network Settings.

http://halfelf.org/ebooks/wordpress-multisite-101/! Page 23 of 61

4 You may hear the ‘Super Admin’ referred to as the ‘Network Admin’ or ‘Super Grover’ or even ‘Cape Wearing Users’ - They all mean the same thing.

There’s quite a bit of information on this page, and much of it can be confusing. Some of the settings require familiarity with how servers are designed, while others are very obvious. We’ll take them by the numbers.

OPERATIONAL SETTINGSThese settings are pretty obvious. You can change the Super Admin

email to anything you want, but make sure it really does exist.

Registration SettingsThere are multiple settings in this section. An important point to

remember is that users are network wide. Once created, they have the potential to be added to any site on the network. Naturally they’re not all given that access, though they can be. This is why, when you add a new user, they don’t show up on a site right away. You have to add them to the network, then to the site (unless you use a plugin, see the advanced section).

Allow New RegistrationsBy default, no one can register. The settings are fairly obvious. People

can either not register, register for accounts, get an account and then make a site, or be able to create an account and a site at the same time.

http://halfelf.org/ebooks/wordpress-multisite-101/! Page 24 of 61

WordPress.com allows users to create both sites and user accounts at the same time. This does not mean you should do the same thing! Allowing anyone under the sun to register and make a site on your network can be risky if you’re not prepared to support all those people. Remember, what they post on your site is your responsibility, and if they break the law, or bring the ire of someone on them, you pay the price. Be responsible.

Registration NotificationThis one’s straight forward. The email goes to the address listed in

Super Admin Email. You can’t change this without activating the new email (you’ll get an email asking you to do this).

Add New UsersIf checked, admins of sites can add new users to the network and their

sites. Otherwise, they can only add users that already exist on the network to their sites.

Banned NamesThe listed names cannot be used for user names or blog names. You

really don’t want to remove the ones listed, but adding to them is fine.

Limited Email RegistrationsYou can restrict your site so only the domains listed can join your site.

This is particularly useful if you’re running a site for a school or a company. Just put example.edu or example.com in the box.

Banned email domainsYou can block emails from being able to register.

NEW SITE SETTINGSAll the options in this section will help you customize what new sites

on your network look like. Make special note of any ‘constants’ like SITE_NAME or USERNAME. These are special variables used by WordPress, and deleting them will make it hard to recover.

These settings mimic the defaults that you see on a normal WordPress install.

http://halfelf.org/ebooks/wordpress-multisite-101/! Page 25 of 61

•Welcome Email is what the new site admin receives when their site is created.

•Welcome User Email is what new users added to the site receive

•First Post is the first post, commonly known as ‘Hello World.’

•First Page is the first static page, usually used as an ‘About’ page.

•First Comment is the sample comment left, to show what comments look like.

•First Comment Author is the name of the comment author.

•First Comment URL is the URL, if you want one.

UPLOAD SETTINGSThese settings can limit the upload abilities of subsites. If you intend

to upload large files like videos, you will need to change the settings accordingly. If you want to keep the defaults low, but customize individual sites, you can do that in another section

Bear in mind, changing the file types you allow here does not automatically permit WordPress to upload them. You’ll need to make an MU Plugin to handle that (which we’ll get to later).

http://halfelf.org/ebooks/wordpress-multisite-101/! Page 26 of 61

Chapter 6

Managing SitesSites can only be created with characters a-z and 0-9. While a Super

Admin can go in and add other characters (like underscores or hyphens) later, it’s suggested this be avoided, especially if you’re using subdomains. Not all servers support non-alphanumeric characters in subdomains.

ADD NEW SITEAdding a new site as the admin is simple. From the Super Admin

dashboard, you can either click on the ‘Create a New Site’ link or go to the Sites menu and click on ‘Add New.’

Either will bring you to a new screen called Add New Site.

Simply enter in the information and a new site will be created. As the Network Admin, you will be able to use any character, and not just a-z and 0-9.

http://halfelf.org/ebooks/wordpress-multisite-101/! Page 27 of 61

LISTING SITESYour sites will be listed on the Sites menu under the listing ‘Sites’ and

will appear thusly:

You can also get a list of sites off the toolbar, however these will only show sites that your ID is an administrator of. If you create a site and make another user the site admin, you will not see it listed in the toolbar.

EDITING, DELETING AND ARCHIVING SITESIf you hover over a site, you will see new options:

•Edit will take you to a screen where you can change site options.

•Dashboard takes you to the normal wp-admin dashboard.

•Deactivate and Archive both close the site and prevent non logged in users from seeing it.

•Spam marks a site as spam and locks it.

•Delete removes the site and all its content from the database.

•Visit goes to the site URL.

http://halfelf.org/ebooks/wordpress-multisite-101/! Page 28 of 61

EditThe Site Edit feature is where you can can customize settings normally

found on the ‘Settings’ menu of the Dashboard. There are four main sections.

InfoThe basic site information, like domain, path, registration date, and

status are found here. While it is possible to change a site name in this section, doing so on an existing site can have a dramatic outcome if you change the length of the site name.

It’s in this section you can add non-alphanumeric characters, however do so with caution, for the reasons mentioned earlier.

UsersThe users tab lists all users on the site. We’ll talk more about how to

add users later. Suffice to say, if you have users on the network and wish to add or remove them to the site, you can do so here.

http://halfelf.org/ebooks/wordpress-multisite-101/! Page 29 of 61

ThemesThe themes tab lists all the themes installed on the network. If they’re

greyed out, they are currently not available to this site. This will be explained in more detail in the themes section.

SettingsThe settings tab is a highly advanced section that the vast majority of

you will never need to edit. That said, it’s often easier to go here and make changes than it is to poke around the dashboard of each site to make adjustments. Also, there are a few settings users expect to see on a normal admin dashboard, like the media settings where they can change the file upload directory, that simply don’t show on Multisite.

The reason is that with a Multisite, you’re using shared space. It’s much easier to support users if everyone has the same setup. Also, the normal admin users don’t generally have access to create new directories on the server, so you, as the Super Admin, must create the folders and make the appropriate changes.

The one setting most people will need to update is at the very bottom - Site Upload Space Quota - which can be changed to allocate more or less disk space on a per-site basis.

Everything in this section makes a direct edit to your database. Edit with extreme caution, and if you’re not sure, ask for help or leave it alone.

http://halfelf.org/ebooks/wordpress-multisite-101/! Page 30 of 61

Chapter 7

Managing UsersBy default, users are added to the Network, not an individual site. This

causes much confusion with users, as they think they’ve signed up for a site, but instead they have to be added.

Also, unlike a single site install, you must use only lowercase letters. This is because, when users are permitted to create a user account and site together, the default path of the site matches their user name. For example, if a user logged in and requested the username of foobar, they would be prompted to create a site with the URL http://example.com/foobar

If permitted, users can register to the network themselves. Otherwise you will need to add them. Site Admins can always add existing users to their sites, but they cannot add new users to the network unless that setting is checked in Super Admin > Settings.

Users who do not belong to any site are still able to log in to the network, but they only have access to the special user dashboard and profile: http://example.com/wp-admin/user/ . Here they can edit their profile, which is network wide.

HOW TO ADD NEW USERS TO THE NETWORKFor the Super Admin, the easiest way to add a user it so go to Super

Admin > Users > Add New, and fill in the form.

http://halfelf.org/ebooks/wordpress-multisite-101/! Page 31 of 61

HOW TO ADD NEW USERS TO A SITEVia the Super Admin

Go to Super Admin > Users > All Sites to edit the site. Click on the users tab and add new user:

Via the Site AdminGo to the dashboard of the site and go to Users > Add New. Fill in the

form for Add New User.

Note: This is the only location where you can add a user and not email them a notification.

http://halfelf.org/ebooks/wordpress-multisite-101/! Page 32 of 61

HOW TO ADD EXISTING USERS TO A SITEIf a user already exists on the network, either having registered

themselves or by you, you will still need to add them to a site.

Via the Super AdminGo to Super Admin > Users > All Sites to edit the site. Click on the

users tab and add the user:

Select the role the user should have and hit save.

Via the Site AdminThis is only available to Super Admins, unless you’ve checked ‘Add New

Users’ in the Network Settings section:

By default this is not checked.

If it is, the site admin can go to their Dashboard and visit Users > Add User, and fill in the form for Add New User.

http://halfelf.org/ebooks/wordpress-multisite-101/! Page 33 of 61

Again, this is the only location where a user can be added without sending a notification email.

HOW TO ADD USERS TO ALL OR SOME SITESThis can only be done via plugins, and will be addressed in the

advanced section.

HOW TO MAKE A NEW SUPER ADMINAs a Super Admin you have access to do anything, from installing

plugins and themes, to added and deleting users and sites. This is different than being the administrator of a site on the network. A site admin only has access to make changes on their own site. Because of the elevated permissions a Super Admin has, you should only give this access to people you trust completely.

In order to make a user a Super Admin, go to Network Dashboard > Users and click on ‘edit’ for the user. On that page, you will see an option under Username that says Super Admin. Check the box and click save.

http://halfelf.org/ebooks/wordpress-multisite-101/! Page 34 of 61

You can remove access the same way, from all users except your own. If there is only one Super Admin, access cannot be removed, which is a good thing!

HOW TO DELETE USERSFor the most part, deleting a user is the same as it is on Single installs

of WordPress.

To remove a user from a site you simply go to that site’s user management page and remove them. To delete a use entirely, the Super Admin must visit the Network Users management page and click on delete. As of WordPress 3.6, you will be prompted to transfer or delete all posts from any and all sites that user has made them.

http://halfelf.org/ebooks/wordpress-multisite-101/! Page 35 of 61

Chapter 8

Managing PluginsUnless you’ve enabled the plugins menu in Site Settings, site admins

will not be able to see which plugins are installed, nor will they be able to activate or deactivate plugins.

Plugins are installed in the same location as a regular WordPress install, and are available for use on all sites. Only the super admin may install plugins, in order to prevent an ignorant or malicious user from crashing your network.

If the menu is available, site admins will see all inactive or per-site activated plugins.

INSTALLING PLUGINSPlugins can be installed via FTP/SSH or using the plugin administration

page on Super Admin > Plugins > Add New. The screens are identical to that of the normal WordPress install save the last.

Once the plugin is installed, you are given the option to Network Activate instead of simply ‘activate.’

ACTIVATING PLUGINSThere are two ways to activate plugins. You can Network Activate or

you can activate per site. If the plugin admin menu is disabled, only the Super Admin can activate per-site, and you will need to visiting each site to do it.

Network Activating a plugin forces it to ‘on’ on all sites in your network. Doing so will make it invisible to all site admins, and the plugin will not be shown on their ‘active plugins’ list.

http://halfelf.org/ebooks/wordpress-multisite-101/! Page 36 of 61

Activating a plugin per-site simply means that the site was activated via the site’s dashboard in the Plugins menu. This can be done by a Super Administrator or, if permitted, the site admins.

MUST-USE PLUGINS (AKA MU PLUGINS)If you are using the Multisite version of WordPress, Must Use Plugins

are special WordPress Plugins installed in a special directory next to the normal /plugins/ dir (/mu-plugins/). They are 'must-use' because once their file is placed in the /mu-plugins/ directory. They are instantly activated and cannot be de-activated using the admin plugins panel, as don't even show up on the list for non super admins.

These are useful for providing functionality across the entire blog network. They are loaded before normal plugins, which means that code and hooked-functions registered in an mu-plugin can be assumed available to all other plugins.

Don’t think that all MU Plugins are actually going to be used on all sites, though. You can put if-statements around the code to specific ‘If this is site #2, then…’ which give you added flexibility and control.

Must-use plugins are never shown on the per-site plugin page, to any users. They can only be seen on the Super Admin’s plugin page.

HOW SHOULD I ACTIVATE A PLUGIN?This is a complicated question. For the most part, any well-written

plugin will function regardless of if it’s activated per-site or network wide. Certain plugins are only able to be activated on the network, and those will not permit you to activate them per-site. Other plugins will recommend you activate per-site. Always read the plugin documentation fully before activating.

In general, you should only use the Must-Use Plugins location if directed to do so by the plugin author.

Should the plugin not function correctly when network activated, deactivate it and try using it per-site.

DELETING PLUGINSGenerally, you can delete plugins the same way you added them, via

the Super Admin. The caveat is that if a plugin was activated per-site on

http://halfelf.org/ebooks/wordpress-multisite-101/! Page 37 of 61

the main site of your network, you’ll have to go deactivate it first, and then delete. If the plugin was network activating, or active on any other site, it can be deleted.

http://halfelf.org/ebooks/wordpress-multisite-101/! Page 38 of 61

Chapter 9

Managing ThemesThemes, like plugins, are only able to be installed on the Network

dashboard, under the Themes menu.

INSTALLING THEMESThemes can be installed via FTP/SSH or using the plugin administration

page on Super Admin > Themes > Add New. The screens are identical to that of the normal WordPress install save the last.

Once the plugin is installed, you are given the option to Network Enable instead of simply ‘enable.’

NETWORK ENABLING AND DISABLING THEMESNetwork Enabling a theme will make it available for use on all sites in

your network. When you look at the Installed Themes on your Network Dashboard, you will see the ones that are network enabled in light grey, while the disabled ones are in dark grey.

On an individual site dashboard, all Network Enabled themes are displayed as installed themes.

http://halfelf.org/ebooks/wordpress-multisite-101/! Page 39 of 61

To enable or disable, simply click on the Network Enable or Network Disable links.

Disabling a theme will not remove it from any site that’s currently using the theme. The theme will remain active on those sites, but they won’t be able to change back to it, should they switch to a different theme.

ENABLING A THEME FOR ONE SITEIf you have a theme you want to enable for only one site, you will have

to go to the Network Dashboard, click on ‘All Sites’ and edit the site. From there, go to the ‘Themes’ tab.

There you will see any non-network enabled theme. Click on Enable and the theme will be available on that site.

CHANGE THE DEFAULT THEMEThe WordPress default theme (currently Twenty Eleven) is the default

theme for all sites. This can be changed to any theme you have installed on your server by editing the wp-config.php file.

Add this line below your Multisite section in that file:

http://halfelf.org/ebooks/wordpress-multisite-101/! Page 40 of 61

define('WP_DEFAULT_THEME', 'classic');

Where classic is the folder name of your new default theme.5

DELETING THEMESYou can delete themes the same way you added them, via the Super

Admin. If you delete a theme that’s in use, any site that was using that theme will display a blank white page to all visitors, until someone changes the theme in either the site dashboard or the network dashboard. For this reason, it’s considered a bad idea to delete an active theme.

EDITING THEMESOnly the super admin can edit themes, and this is done via the

Network Dashboard, under Themes > Edit Themes

Remember, when you edit a theme’s core files, you edit them for all sites on your network.

If admins of other sites need to edit their theme, you may need to install a CSS editor plugin such as the one found in Jetpack - http://wordpress.org/extend/plugins/jetpack/ - bear in mind, Jetpack requires a connection to WordPress.com that must be generated on each site of your network. The following plugins also purport to provide the same feature:

http://wordpress.org/extend/plugins/pc-custom-css/

http://wordpress.org/extend/plugins/my-custom-css/

http://wordpress.org/extend/plugins/custom-css-manager-plugin/

http://halfelf.org/ebooks/wordpress-multisite-101/! Page 41 of 61

5 See http://wpmututorials.com/how-to/change-the-default-theme-for-sites-without-a-plugin/ for more information.

Chapter 10

What Your Users Must KnowNow that everything’s set up, it’s time to get those users!

HOW DO USERS SIGN UP?Provided you allow for user registration, visitors can go to http://

example.com/wp-signup.php and register for a new account.

They will be emailed their password, and cannot access the site without activating their account.

You cannot activate an account for a user, even as a super admin, so if they don’t get the email, or don’t reply, it can get messy, as the only way to purge out the activations is through the database.

http://halfelf.org/ebooks/wordpress-multisite-101/! Page 42 of 61

If you allow users to create an account and a blog at the same time (called ‘Open Registration’) the form includes the following option:

If you have a subdomain install, going to http://fakesub.example.com will send you to http://example.com/wp-signup.php?new=fakesub and allow them to register, with an additional note:

HOW DO USERS CREATE NEW SITES?If the user is creating a new site when they register, they have the

option to click on ‘Gimme a site!’ when they pick their user name. By default, the user name is filled in as the blog name, but that can be changed.

Simply fill in the form and click ‘Signup.’ for the site to be created.

http://halfelf.org/ebooks/wordpress-multisite-101/! Page 43 of 61

If the user is creating a site after they made an account, they simply go back to http://example.com/wp-signup.php and fill in this form:

This form is also what you see if you want to create additional sites. There are no default limits to how many sites a user can make, but you can limit them via plugins.

THE DIFFERENCE BETWEEN A BLOG AND A MULTISITE BLOG?When you run your own single install of WordPress, you’re actually the

‘Super Admin’ of your site! When you’re a site admin, you have slightly fewer powers. It’s easier to explain what you can’t do as a Site Admin:

•You can’t change the URL of your site.

•You can’t move the location of media files.

•You can’t use ‘embed’ codes for videos6

•You can’t post by email.

http://halfelf.org/ebooks/wordpress-multisite-101/! Page 44 of 61

6 We suggest you use oEmbeds instead - http://codex.wordpress.org/Embeds

•You can’t install plugins or themes.

•You can’t edit plugins or themes.

As you can see, there are limitations, however most of these cause no issues to your site admins.

http://halfelf.org/ebooks/wordpress-multisite-101/! Page 45 of 61

Chapter 11

FAQBefore we get to the advanced topics, let’s take a moment to go over

the most common questions.

WHERE ARE MY SITES? I DON’T SEE THEM ON MY SERVER!If you mean ‘Why isn’t there a folder called sitename on my server?’

the answer is that they are virtual.

Just like you can’t see the ‘files’ for posts and pages on your server, everything that contains the information for your site on a network is in the database. The only files that are uploaded are images.

WHERE ARE MY IMAGES?That depends on what version of WordPress you started on.

If you were using WPMU (the pre 3.0, separate install) your images are all in /wp-content/blogs.dir/#/files where # is the site number.

If you started Multisite in WordPress 3.0, your main site keeps its images in /wp-content/uploads/ but the rest of them are in blogs.dir.

If you started using Multisite in WordPress 3.5, your main site keeps its images in /wp-content/uploads/ and the rest are in /wp-content/uploads/site/#/

Just upgrading from WPMU to WordPress 3.0 to WordPress 3.5 does not move your images, they’ll remain with what they were when you started.

ALL MY IMAGES UPLOAD TO FILES, BUT THERE’S NO FILES FOLDER!

This is only applicable to Multisite installs that began pre WordPress 3.5

That’s okay! The /files/ folder is virtual. Your images on subsites upload into /wp-content/blogs.dir/#/files and, through the magic of .htaccess , they are red i rected f rom http://site2.example.com/files to http://example.com/blogs.dir/2/files/

http://halfelf.org/ebooks/wordpress-multisite-101/! Page 46 of 61

How does that work?

In your .htaccess there’s a line like this:

RewriteRule ^([_0-9a-zA-Z-]+/)?files/(.+) wp-includes/ms-files.php?file=$2 [L]

That line says ‘Any URL that goes to /files/ should be redirected to /wp-includes/ms-files.php instead’

And it’s that file which detects what site you’re coming from, where the image actually is, and outputs it for your visitors.

By the way, don’t make a folder (or file, or page) named ‘files’ or you’ll break the redirect magic.

CAN I MAKE AN EXISTING SITE INTO A MULTISITE?Sure, but there are caveats.

By default, WordPress will only let you turn on subdomains if your site has existing for more than 60 days. This is to avoid possible conflicts between pages on your main site and your new subsites. You can change that (just change the value for ‘Subdomains’ when you define it in your wp-config.php), however remember that your URLs for posts will have /blog/ prepended to them, and that can cause 404s on your site. This can normally be fixed with some .htaccess magic.

WHY IS THE THEME NOT WORKING ON MY SUBSITE?If you get unstyled content on your subsites, where all you see is the

content but no theme formatting, the odds are your server isn’t reading your .htaccess file correctly. Normally that occurs when mod rewrite isn’t enabled (though if you verified that pretty permalinks work before you turned on Multisite, you know they are), or that your httpd.conf file doesn’t have AllowOverride set to All or Options All.

If you don’t know how to edit that file, or don’t have access, ask your webhost.

HOW BIG IS MY DATABASE GOING TO GET?That depends on how you look at it. For every site you create on your

network, you will have, minimum, nine new tables created. That can add

http://halfelf.org/ebooks/wordpress-multisite-101/! Page 47 of 61

up pretty fast, especially if you have open registration. Normally, however, this isn’t a problem, as most sites are relatively small.

HOW BIG IS MY SERVER GOING TO GET?Depends on how many images people upload, and how big they are.

But yeah, that can get big too.

WILL MULTISITE MAKE MY SERVER SLOWER?Indirectly. See, the more sites you have on your server, the more

traffic you have. The more traffic, the slower the server, unless you optimize it. There are minification and caching plugins that can help, but also sitting down and tuning your server will help exponentially.

HOW DO I KNOW WHICH PLUGINS ARE SAFE TO USE ON MULTISITE?

Most plugins work just fine if you activate them per-site. Some plugins don’t. If a plugin is tagged ‘multisite’ or ‘wpmu’ in the official plugin repository, it’s a good bet that it’ll work. If it’s not, well, you have to experiment a little. Always read the full documentation on a plugin before installing!

CAN I INSTALL MULTISITE IN A SUBFOLDER?Sure, with caveats.

•You can’t map domains

•All your URLs will contain that subfolder name.

Same thing for subdomains.

CAN I USE ‘GIVING WORDPRESS IT’S OWN DIRECTORY’ WITH MULTISITE?

As of WordPress 3.5, yes you can. If you want to install in http://example.com/wordpress but have your main site use the URL http://example.com then just install it like you normally would in that case and set up the ‘own directory’ before Multisite. Otherwise you have to move Multisite, and that’s not really easy. In fact, it’s so much not easy that doing it won’t be explained in this ebook.

CAN I MAKE ALL MY SITES USE THE SAME MEDIA LIBRARY?

http://halfelf.org/ebooks/wordpress-multisite-101/! Page 48 of 61

Not out of the box, no. While there are plugins that claim to do this, there are some serious concerns you should be aware of before you do this.

First of all, do you really need to share all your media amongst all sites? Certainly if you’re working on a design aspect that uses an image, you should have it shared, but generally that’s the bailiwick of the theme or plugin you’re using.

Secondly, if your multisite is open, do you really want all users sharing all media?

Still want to? Okay.

http://wordpress.org/extend/plugins/network-shared-media/

CAN I MAKE ALL MY SITES USE THE SAME CONTENT?Yes but don’t.

Look, I know that people really want to do this, to share content between sites, and that’s great, but you have to remember that Google and all the other search engines see multiple sites with 100% the same content as spammers. You’re not a spammer, are you?

I NEED MORE HELP! WHERE CAN I GO?http://wordpress.org/support/forum/multisite/

http://halfelf.org/ebooks/wordpress-multisite-101/! Page 49 of 61

Chapter 12

Advanced TopicsIf you’ve gotten this far, you’re ready to run a network! As with all

things, there are some more advanced topics. From this point on, you will have to be comfortable with managing the files on your server and accessing the database.

Many of these topics will use plugins, as well.

GO BACK TO A SINGLE INSTALLAfter all that, sometimes people realize that they didn’t want

Multisite. It can be removed fairly painlessly.7

1. Delete any extra sites you may have created, either moving the content and users to the main blog or wherever you desire. One the sites are deleted, you cannot retrieve the content.

2. Remove the lines added in the wp-config.php file.

3. Restore the .htaccess file to the default (you can usually restore these by resaving the permalinks).

4. Remove the wp-content/blogs.dir (don’t worry, your main site stored everything in wp-content/uploads).

5. Drop these global tables from the database:wp_blogswp_blog_versionswp_registration_logwp_signupswp_sitewp_sitemeta

That’s it!

http://halfelf.org/ebooks/wordpress-multisite-101/! Page 50 of 61

7 Edited from http://wpmututorials.com/how-to/how-to-disable-multisite/

EXPORTING A SITEIf you want to export one site from the network and install somewhere

else, you will have to make a couple important decisions. If all you care about is the content, a traditional WordPress export will be just fine.8 You can simply import the content on the new location, be it a separate install of WordPress, or just a different site on your network.9

If you need to keep the look and feel of your site, all the plugins, theme settings, and users who don’t have their own posts, it’s vastly more complicated. The basic steps would be to:

1. Install WordPress in the new location.

2. On the existing site, make a note of all users on the site and their user ID.

3. Create your authors (their passwords will change, everyone will have to cope)

4. Export all the wp_x_[tables] from your database, where x is the site ID.

5. Rename the tables in that export file to just wp_[table]

6. Search the export file for the old site URL (i.e. http://example.com/sitename/ ) and replace with the new one (i.e. http://newexample.com )

7. Make a list of all the users and their IDs. Compare this to the list you made in step 2 and make sure you know everyone’s old and new user ID.

8. Edit the wp_posts values for post_author, changing accordingly based on the table you made in step 7.

9. Import the database.

10.Copy /wp-content/blogs.dir/ID/files/ from the old server, and place it in /files/ on your new server.

http://halfelf.org/ebooks/wordpress-multisite-101/! Page 51 of 61

8 To export, see http://codex.wordpress.org/Tools_Export_Screen

9 To import, see http://codex.wordpress.org/Tools_Import_Screen

If at all possible, just use the traditional export/import. You’ll get a much cleaner database in the end.

MOVING YOUR NETWORKMoving a network from one server to another, provided none of the

URLs are changing, is as simple as copying over the database and all the files.

If, instead, you are changing domains, then the best way to move Multisite is to move the files, edit the .htaccess and wp-config.php (if the folder name containing Multisite changed), and then manually edit the database. Search for all instances of your domain name, and change them as needed. This step cannot yet be easily automated. It's safe to search/replace any of the wp_x_posts tables, however do not attempt blanket search/replace without a special search and replace script.

You can get a copy of the Search and Replace Script at http://interconnectit.com/124/search-and-replace-for-wordpress-databases/

If you're moving Multisite from one folder to another, you will need to make sure you edit the wp_blogs entries to change the folder name correctly. You should manually review both wp_site and wp_blogs regardless, to ensure all sites were changed correctly.

Also manually review all the wp_x_options tables and look for three fields and edit as needed:

home

siteurl

fileupload_url

If you are moving from subdomains to subfolders, or vice-versa, remember to adjust the .htaccess file and the value for SUBDOMAIN_INSTALL in your wp-config.php file accordingly.

ALLOWING MORE MEDIA UPLOADSMentioned earlier was that adding in allowed filetypes in your network

options doesn’t actually set WordPress to let you upload them. To do that you’ll want to make a MU Plugin. Using an MU Plugin is generally a better idea than a Network Activated plugin, since you as the Network Admin

http://halfelf.org/ebooks/wordpress-multisite-101/! Page 52 of 61

will be the only one who decides what filetypes are allow and what ones are not. Of course, if you trust all your site admins, then using a plugin that allows each one to change their filetypes individually is just fine.

<?php

/*

Plugin Name: Allow More Filetypes

Description: Allow additional file types to be uploaded by WordPress.

*/

add_filter('upload_mimes', 'add_custom_upload_mimes');

function add_custom_upload_mimes($existing_mimes){

$existing_mimes['epub'] = 'application/epub+zip'; //allow epub files

$existing_mimes['webm'] = 'video/webm'; //allow epub file

return $existing_mimes;

}

PRE-CONFIGURING PLUGINSBy default, plugins are either on or off, and the settings are handled

per-site. In some cases, you want to pre-configure plugins for your users. These days, a lot of plugins are adding Network Management screens to make this easier for you, but when they don't, you need to use a plugin.

The following plugins allow you to pre-configure other plugins' settings for your network:

http://wordpress.org/extend/plugins/yd-wpmu-sitewide-options/

http://wordpress.org/extend/plugins/multisite-plugin-manager/

RESTRICTING PLUGINSIf a plugin is not network activated, it’s available for all sites to

activate as they chose. Sometimes you don’t want this, but instead want

http://halfelf.org/ebooks/wordpress-multisite-101/! Page 53 of 61

to limit certain plugins to only be run on certain sites. There are multiple plugins that can be used for this, depending on how you want to manage plugins.

Restrict Multisite Plugins provides an interface similar to how the ‘themes’ section looks. http://wordpress.org/extend/plugins/restrict-multisite-plugins/

Multisite Plugin Manager allows you to manage plugin activation. http://wordpress.org/extend/plugins/multisite-plugin-manager/

MANAGING USERS ACROSS THE NETWORKBy default, WordPress Multisite has your users segregated per-site. This

may not be exactly what you want, especially if you’re running a BuddyPress social network. The following plugins allow you to do that in different ways.

Network Manage Users lets you mange all users and their sites from the network admin dashboard.

http://wordpress.org/extend/plugins/bulk-user-management/

Multisite User Management lets you add users to sites automatically and can be set up differently per site.

http://wordpress.org/extend/plugins/multisite-user-management/

Join My Multisite gives each site admin the ability to decide how they want to add new users (or allow new users to add themselves).

http://wordpress.org/extend/plugins/join-my-multisite/

MAPPING DOMAINSYou can run multiple domains from one Multisite, by using a domain

mapping plugin. You will need to create a site for each domain, but once that’s done, it’s fairly simple to map the domain. The plugin ‘WordPress MU Domain Mapping’ is very reliable.

http://wordpress.org/extend/plugins/wordpress-mu-domain-mapping/

http://halfelf.org/ebooks/wordpress-multisite-101/! Page 54 of 61

The complicated aspect of mapping a domain is in mapping the domain to your server. The basic step is to point the DNS settings of your new domain to your existing server. However, depending on your host, you may also have to park the domain in order to add it to your own DNS server. If you’ve never parked a domain, or made an add-on, you should check with your webhost first.

Once you’ve sorted out mapping the domain, you can point it to your site ahead of time, and verify it works by going to http://newdomain.com, which should take you right back to http://example.com/

From the Domain Mapping menu, set either your Server IP or the CNAME, pick your options, and hit save.

The options are as follows:

•Remote Login – All sites will log in through your main domain. This is good, because once you’ve logged in to one, you logged in to all (due to how cookies work). The downside is everyone will see their URL change when they log in.

•Permanent redirect (better for your blogger’s pagerank) – Instead of using your original URLs (like http://subsite.example.com ) you now use http://newdomain.com. Leave this checked, you want it.

•User domain mapping page – If you want to allow users to map their own domains, check this.

•Redirect administration pages to blog’s original domain (remote login disabled if redirect disabled) – All sites Dashboards will rema in re ferenc ing the ma in domain ( i .e . h t tp ://sub s i t e .examp le . com/wp-admin i n s tead o f h t tp ://newdomain.com/wp-admin )

•Disable primary domain check. Sites will not redirect to one domain name. May cause duplicate content issues. - As it says.

•Then you go to the ‘domains’ Menu and add in a new domain. It’s as simple as filling in this form:

http://halfelf.org/ebooks/wordpress-multisite-101/! Page 55 of 61

That’s it!

MULTIPLE NETWORKSIf you’re running subdomains, sometimes you want to be able to create

sub-sites off the subdomains, like http://subsite.example.com/newsite, or, in the case of mapped domains, have it run it’s own network.

While it is possible, it always requires a plugin, and it can get complicated very quickly.

WP Multi Network http://wordpress.org/extend/plugins/wp-multi-network/

Networks+ ($25.95) http://wpebooks.com/networks/

SPLITTING YOUR DATABASEIf your site gets very large, you may need to split it into multiple

databases. HyperDB and SharDB are the best plugins for the job, but both require a great deal of SQL savvy.

http://wordpress.org/extend/plugins/hyperdb/

http://wordpress.org/extend/plugins/shardb/

CHANGE IMAGES TO USE THE NEW ‘3.5’ STYLE?It’s not easy, but yes. Keep in mind, you do not have to do this, and

this process assumes you’re familiar with WordPress, multisite, the database, and moving files. If that’s not you,just leave them be.

http://halfelf.org/ebooks/wordpress-multisite-101/! Page 56 of 61

1. Copy all of your images from /blogs.dir/#/files/ to /uploads/sites/#/

2. Search/replace your database, to change /blogs.dir/#/files/ to /uploads/sites/#/ - You’ll want to change post_content, but you may also need to edit themes and widgets, so you’ll want to use the Search and Replace Script at http://interconnectit.com/124/search-and-replace-for-wordpress-databases/ for best results.

3. Edit every site in the Network Admin -> Site -> Options and blank out the options for upload_path, upload_url_path, and fileupload_url

4. Change the site option for ms_files_rewriting to false (this should be in wp_options)

Kailey Lampert wrote a script to help with the Database edits, but it’s not something you should run on your production server without having a LOT of good backups.

https://github.com/trepmal/ms-files.php-removal-utility

REMOVING ‘BLOG’ FROM THE URL OF YOUR MAINSITEIf you installed Multisite as a subfolder setup, you may recall that

the /blog/ slug shows up in your posts, and you were told you can’t change that? Actually, you can remove this if you absolutely must, but it’s not supported nor recommended.

Go to Network Dashboard -> Sites and edit your main site.

Click on the ‘Settings’ tab and scroll down till you see Permalink Structure. Delete /blog from that so you just have /%year%/%postname%/ or whatever you want your format to be.

http://halfelf.org/ebooks/wordpress-multisite-101/! Page 57 of 61

Please keep in mind, you now can never edit your permalinks on your main site, except through this method. If you go to your main site’s dashboard and use the Permalink page there, the slug will magically return.

http://halfelf.org/ebooks/wordpress-multisite-101/! Page 58 of 61

Chapter 13

Plugin SuggestionsMany tweaks to your site will require you to install plugins. The

following plugins are some of the more popular additions to Multisite.

List All Posts from All SitesThere are a few different ways to do this. The most reliable method is

to use the, oddly named, plugin ‘WordPress MU Sitewide Tags,’ which will copy all posts from all sites to one ‘tag’ site, which can then be used to list all posts.

http://wordpress.org/extend/plugins/wordpress-mu-sitewide-tags/

Posting Content to Multiple SitesThis can be done via plugins, depending on how you want to push the

content.

ThreeWP Broadcast Broadcast a post/page to other blogs. Whitelist, blacklist, groups and automatic category+tag posting/creation available. http://wordpress.org/extend/plugins/threewp-broadcast/

Multipost MU Allows you to duplicate posts and pages to multiple sub-blogs at once. http://wordpress.org/extend/plugins/multipost-mu/

Network MenusSharing a menu across multiple sites can be frustrating, since each site

can edit its own menus. Using the ‘Networkwide Menu’ will help with that.

http://wpmututorials.com/plugins/networkwide-menu/

Configure New Site Defaults

http://halfelf.org/ebooks/wordpress-multisite-101/! Page 59 of 61

WPMU New Blog Defaults extends the ‘New Site Settings,’ allowing you to edit everything from Blog Title and Date Format to XML-RPC and Comment Moderation.

http://wordpress.org/extend/plugins/wpmu-new-blog-defaults/

Copying SitesBlog Copier and Replicator let you duplicate an entire site, whole sale,

into a new on.

http://wordpress.org/extend/plugins/blog-copier/

http://wpebooks.com/replicator/

PrivacyMore Privacy Options and Network Privacy both extend the normal

‘hide my site from search engines’ and allow you to hide certain sites from non-members.

http://wordpress.org/extend/plugins/more-privacy-options/

http://wordpress.org/extend/plugins/network-privacy/

Keep tabs on new blogsModerate New Blogs requires a site admin to approve all new sites.

http://wordpress.org/extend/plugins/moderate-new-blogs/

Limit Blogs Per User limits the number of blogs any one user can create

http://wordpress.org/extend/plugins/limit-blogs-per-user/

Spam ControlNearly all spam plugins for WordPress will work on Multisite, however

many need to be configured per-site.

Sitewide Comment Control is a Multisite Only plugin that allows you to manage the ability of unregistered visitors to comment on all sites on your network.

http://wordpress.org/extend/plugins/sitewide-comment-control/

http://halfelf.org/ebooks/wordpress-multisite-101/! Page 60 of 61

About The Authors

Mika Epstein (aka Ipstenu)

Mika is a self-taught programmer who studied Anthropology and Creative Writing in university. After fourteen years working as a corporate wage slave for The Man, she ran off to work for DreamHost where she gets paid to spend her time playing with WordPress, among other open source web products. A regular

volunteer in the forums, Mika also writes the occasional plugin.

Mika blogs about technical oddities at http://halfelf.org and wrote the sequel to this book: WordPress Multisite 110

Her ebooks can be found on her website as ‘Pay What You Want.’ A six dollar donation is recommended.

http://halfelf.org/ebooks/wordpress-multisite-101/

Andrea Rennick (aka andrea_r or sillyandrea)

Andrea is a self-proclaimed Mommy Blogger, who learned everything about Multisite back when it was WPMU because she saw a need. Now she’s living the dream, working with WordPress from home for Copyblogger Media, LLC. Of course, Andrea still finds time to help out in the forums and support plugins she

and her husband, Ron, provide.

Andrea maintains the fabulous resource http://wpmututorials.com