When WordPress 3 launched on June 17th of 2010, the ability to run a multisite network from a single installation quickly became one of the most talked about features. Formerly known as WordPress MU, this entirely separate WordPress project was simultaneously upgraded and merged with the main WordPress branch. Many were expecting WordPress Multisite to carry with it the usual WordPress simplicity, but there’s quite a bit more to do after WordPress’ famous 5-minute installation when creating a multisite network, and the complexities of the network system have led to some confusion and questions along the way.
Andrea Rennick became a user of WordPress MU about three years ago, when it was still in a pre-beta stage. She was just your typical stay at home mom and teacher, and she wanted to create a community where other homeschoolers could have their own blogs all in one location, so they could find and support one another. It took her about a month just to get everything running, and she was spending so much time on the WordPress MU Support Forum finding answers, that she eventually began helping others. Soon after, she launched WPMU Tutorials as a resource for anyone to learn about WordPress MU and now WordPress Multisite.
We are very fortunate that Andrea has agreed to share with us her solutions to some of the most common WordPress Multisite problems. To avoid any interpretation issues, the rest is entirely in her own words.
“My subdomain sites don’t work, what did I do wrong?”
Subdomain sites are managed on the server through the use of wildcards. This means that the server itself needs to have them set up in Apache, and will send any request for any subdomain, straight through to the WordPress network. Then WordPress will look it up on the database and serve the right content. You also need to have a wildcard subdomain record in your DNS records. It looks like this:
in A * yourdomain.com.
“My subfolder sites don’t work / have no styles / are not in folders on the server. What’s going on?”
Subfolder sites work on the same principle as pretty permalinks do. The URL is rewritten to give the appearance that it is in a folder on the server. So, mod_rewrite has to be working on the server, and actually reading the .htaccess file. It’s the .htaccess file that does the heavy lifting of “making” the subfolder site in this case.
For either kind:
The blogs themselves are virtual. They do not exist on the server. I’ve answered a few threads about the blogs.dir folder that needs to be made on the server when you enable multisite. This folder does not hold the actual blogs. The only use it has is for media uploads from each site. If there is nothing in the folders under the blogs.dir directory, that has no relation to if the site itself shows up or not.
For more information, please see this article.
“There’s a /blog/ in my main blog. Why is it there and how do I remove it?”
Yes, this is done intentionally so any permalink off the main site does not interfere with any site name in a subfolder setup. You will not see this in a subdomain install.
You can remove it by editing the main site details under Super Admin -> Sites and editing the main site.
I actually like to use this to my advantage, and set up a home page for the whole network on the main site, and then use the /blog/ to be the “main” blog on the network.
“Help! my uploaded images don’t work! Also, they are going in one location but my blogs says they are somewhere else, why?”
This is how it is supposed to work. Images are physically located under the blogs.dir folder, in numbered folders from that correlating to each site’s blog-id#. these locations are then rewritten via the .htaccess file and served up to the “new” location. If it’s not working, then either something is missing from the .htaccess file, or the file just isn’t being read by mod_rewrite.
“Do I need a special theme? Why can’t I edit themes? How can I make changes?”
Most any theme for WordPress will work just fine when you are running a network. Super Admins are the only ones who can edit themes, and this is for security reasons. Also, themes are shared. If you set up a network with 10 sites and they all use TwentyTen, only one copy of TwentyTen is in use. This is why each site has its own admin area with their own widgets to manage.
As I touched on in the previous question, the main site’s theme is what controls the main page on the network. Getting familiar with the template hierarchy and using a static home page or the home.php template with various plugins to pull network-wide content will give many Super Admins exactly what they are looking for.
“How do I aggregate or gather all the posts from across all the sites onto the main page of my domain?”
You use the best plugin for this, of course. Sitewide Tags.
This needs to go in the mu-plugins folder, and will run all the time. It puts new options on the Super Admin -> Options page, and you can set it to send all new posts to the main site in the network. When new posts are made, they will be copied over to the main blog, and will retain the originating site’s permalink, so there will be no duplicate content. The only thing it will not pull is comments and post thumbnails.
I’d like to thank Andrea Rennick for generously providing her solutions to these common problems both here and on the WordPress Support Forums. If you need any help beyond what was mentioned above, please feel free to ask in the Multisite section of the WordPress Support Forums where Andrea and the rest of the talented support forum volunteers are on-hand to help you at most hours of the day.