or “How Not to Totally Screw Yourself”

After all this time since it’s been available, I’ve finally properly installed a WordPress 3.3.1 Multisite. What a learning curve… and not for the squeamish. That’s for sure. 🙂Again, this is not for the squeamish, as you’ll need to know your away around FTP, PHP, file permissions, the htaccess file and a few undocumented tricks that will REALLY frustrate you. Ready? Let’s begin… 🙂

Be Prepared

No WordPress installation is the same, yet there are some concepts you’ll have to keep in mind before making the transition to Multisite.

1) Do you want sub-domains or sub-folders?

This makes a BIG difference!… and neither choice is wrong. Just think HARD about what the end-result will be, make your choice and stick with it. Your Search Engine results will take a hit IF you decide one way and then alter it later. Just be cautious. Okay? Basically, you have a choice between:

http://sub-site.main-site.###/

OR

http://main-site.###/sub-subsite/

2) Okay. There IS no #2. 🙂

Why WordPress Multisite?

Honestly? It makes running multiple sub-domains or sites that run from the same URL a piece-of-cake. With the sophistication of MySQL, PHP, WordPress and simple Mod-Rewrite changes to your htaccess file… WordPress Multisite makes trivial the action of creating sub-domains. You will no longer have to manually create your sub-domain and install yet another instance of WordPress. WordPress Multisite takes care of it ALL! One install to run multiple sites. Who wouldn’t love THAT? 🙂

Installing WordPress Multisite

Actually, this part is pretty easy. Much easier than one would expect. The trick is to be sure your WordPress installation is located at the root. Yes, until WordPress makes some the necessary option changes to do otherwise. That means, if your WordPress installation is in a sub-folder, you are NOT a good candidate for MultiSite. You are NOT. 🙂 . You’ll be better off trying to move your WordPress installation to the root-folder and dealing with the consequences of the move. Be Warned. 🙂

Since WordPress 3.0, you’ve been able to setup Multisite… but the SuperAdmin “look” has changed over the following versions. These instructions will be an account of using WordPress 3.3.1. Again, your experience may be different. 🙂

Once WordPress 3.3.1 is installed and running, simply run your favorite FTP client, open the wp-config.php file and add the following line just BEFORE the /* That's all, stop editing! Happy blogging. */ line:

define('WP_ALLOW_MULTISITE', true);

Now, just logout and login again. Voila! Multisite is up and running. Sweet! You made a backup of wp-config.php didn’t you? Well, you really should. Really!

Configuring WordPress Multisite

Take a look at the top Admin bar and open My Sites->Network Admin->Dashboard… from there go to Settings->Network Setup. Here, you will find the necessary edits that you will need to make for both the wp-config.php file and your htaccess file in order to FULLY complete your WP Multisite setup. Again… you know FTP, don’t you. 🙂 Copy those configuration strings and add them to your wp-config.php and htaccess file. BUT!

These additional configurations will cause your site to DEFAULT to a sub-domain configuration. You recall how your site will look from the “Be Prepared” section, didn’t you? OK. If you desire a sub-folder configuration, take a look at the wp-config.php and htaccess file additions. For a sub-folder configuration, change wp-config.php
define( 'SUBDOMAIN_INSTALL', true ); to define( 'SUBDOMAIN_INSTALL', false ); and change the htaccess replacement to:

RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]

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

# add a trailing slash to /wp-admin
RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]

RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
RewriteRule  ^[_0-9a-zA-Z-]+/(wp-(content|admin|includes).*) $1 [L]
RewriteRule  ^[_0-9a-zA-Z-]+/(.*\.php)$ $1 [L]
RewriteRule . index.php [L]

Adding Those Sub-Sites

From here, you can go to My Sites->Network Admin->Sites->Add New.

From here, add the new Site Address (No Spaces) and the Site Title and admin email address. Simple! From here, you should also get a hint as to how the final URL will look. If it looks like a sub-domain and you want a sub-folder or visa-versa, you’ll discover the potential “look” right here. If it doesn’t look right, then you need to go back to your wp-config.php and htaccess file and make the necessary changes. You made backups… didn’t you? No? You fool!

Plugins and Other Gotcha’s

When dealing with WP Multisite, ALL plugins will have to be uploaded and “Network Activated” from the top Network level. Sub-Sites do NOT have the ability to upload/activate their own individual plugins. It’s the nature of the beast.

Still, one has to be VERY cautious as to what plugins will be available. Not every plugin works in the Multisite environment, so you will have to perform due-diligence to fully verify that they will work. Don’t just rely on ONE instance of a plugins verification.. you’ll need more than that. If it’s questionable (and you really need it), then give it a try at the top-level, but KNOW that it’ll work at the sub-level. You will HAVE to know.

In addition, one may be overly judicious in manually creating those sub-domains or sub-folders. DON’T! Do NOT manually create your own sub-directory or sub-domain through your web-hosting provider. Just don’t! You’ll be causing yourself FAR too much pain. Allow WordPress Multisite to perform those features “virtually”. The reason for those Mod-Rewrites in the htaccess file is so that you do NOT have to manually create those physical folders or sub-domains. If you do, then your web-server will use those empty sub-folders or empty sub-domains to display your website. Apache will use the physical domains/folders OVER the virtual domains/folders… which will be mostly empty… and your site will be blank or empty.

Lastly, when adding users to Administrate the domains, do NOT trust adding them as Super-Admin from the top-level domain… to be able to be Administer to the sub-sites. This on one bit me in the A$$ Big-Time. 🙂 Be sure to go to each sub-site and ADD them as Admin for each sub-site you wish them to administer. It’s better to be safe than be sorry. But, there IS a MUCH better way to manage your Multisite Users (even though I found this a little too late 🙂 : install the Multisite User Management Plugin. From their WordPress Plugin Page:

With this plugin, users are assigned a default role for each of your sites. You set the default role for each site and this plugin applies it.

In Conclusion

Let me know of any questions or concerns. I’m certain that I can answer them. OK? Cool. 🙂 Take a good look at Create a Network from the WordPress Codex, How to Enable Multisite , and The WordPress and WordPress Multisite Manual at WPMUdev where I learned most of my information (a little too late, however).