WordPress 3.0 Walkthrough: Multsite
Multisite is the most talked about new feature in WordPress 3.0 – the WordPress team has folded the functionality of WordPress Multiuser into the main WordPress project. So how do you use it?
This tutorial assumes your are comfortable using FTP clients such as Filezilla and doing basic edits of WordPress files.
1. Download WordPress 3.0 release candidate. You can find it here.
2. Edit wp-config in your favorite text editor and add the following line:
define(‘WP_ALLOW_MULTISITE’, true);
(I’d suggest adding it just above the line “// ** MySQL settings – You can get this info from your web host ** //”)
3. Install WordPress normally
NOTE: If you’ve already installed WordPress 3.0, just edit wp-config and add that line of code, there’s no need to re-install.
4. Under Tools on the sidebar, you’ll now have an “Network” option. Click it.
5. Here you’ll setup your “Network” – a Network is all the blogs or sites you’ll have under your WordPress install (if you’re migrating back to WordPress from WordPress Multiuser this might be confusing. In WordPress Multiuser the term for network was “site” and the term for site was “blog.” Explanation here).
If your host supports it, you’ll have the option here to choose between subdomains and subdirectories.
Example of a subdomain: site1.yourdomain.com
Example of a subdirectory: yourdomain.com/site1
Fill out your Network Title and Admin E-mail Address and press install.
6. You’ll be greeted with your next list of steps: creating a blogs.dir directory, editing wp-config.php, and .htaccess. WP recommends, as do I, backing up wp-config.php and .htaccess files before proceeding.
After completing the steps, you’ll need to log back into WordPress.
7. On your next login, you’ll notice a new menu: “Super Admin.”
8. Click “Sites” under this option to create a new site. Fill out the forms accordingly.
9. After creating a new site, click Users. You’ll see a new user was created for the new site.
10. You can control all sites on your network through the Super Admin menu, but for right now you might find it easier to administer individual sites through their own admin menus. You can access them as you would a normal wordpress site. In the example above, it would be: http://mydomain.net/malta/wp-admin
Thanks for this!
I’d really appreciate a Part II with information regarding the use of TLDs in sites(blogs) 🙂
Use this plugin: http://wordpress.org/extend/pl.....n-mapping/
It requires manually installing it (special files in special places) but it does work with 3.0. I’m using it now.
Exactly! 🙂 A tutorial about that, would be awesome! (What the heck is CNAME, ANAME etc?)
Fine. 🙂
http://ottopress.com/2010/word.....-tutorial/
Thanks Otto for useful plugin link. but its not working in 3.04 wp version any solution?
Great tutorial! Easy to understand and easy to follow.
Hi Klint,
Is there any way to use diferent domains and NOT sub-domains?
Regards
Wp3.0 is a WordPressMu evolution, for WpMu there were plugins (not standard plugins but plugins for mu version) that enabled multi-domain, for example: http://wpmudev.org/project/Multi-Site-Manager
I think these plugins modify .htaccess file…but I never used such functionality so I can’t confirm.
Bye
Yup. I knew it was from WordPress Mu but I thought maybe they upgraded it in that way.
Would be cool 🙂
Use the Domain Mapping plugin for TLDs: http://wordpress.org/extend/pl.....n-mapping/
It works with 3.0.
I read that 3.1 may integrate this. Maybe.
Thanks Otto!
Hi
Funny timing – I have just asked a question about server configuration to run sub-domains. Any ideas please.
Rich
To allow subdomains, you have to ad wildcard support to your server config (*). Real easy to do in cPanel, depending on your host. If you are unsure about how to do this, most hosting companies have 24hour tech chat available. Just open up a dialog with one of them and tell them that you need to add wildcard support to your domain.
Note: To do that, you will also need to buy a static IP address on your server, which not all hosts can guarantee.
Thats a really nice tutorial. I want further advanced tips on wordpress 3.0. Looking forward for it.
“9. After creating a new site, click Users. You’ll see a new user was created for the new site.”
I don’t get that. If I’m the admin and I want to create a separate blog for myself I have to login as a different user to the sub-blog?
No, you don’t have to login using the new user – your existing admin account will automatically have full privileges to the new site, even if you go directly to its won wp-admin area.
It doesn’t create a new user if you use the same email over and over. You can create as many sites as you like, just use the same email address.
I have one key question for which I don’t see an answer. I currently have two separate existing WP installations, one in the main directory of a domain, the other in the subdomain. They are integrated using links in our header and navigation bar.
Is there any way to import the second site into the first, so I can use just one copy of WP 3.0 for both? That is, without hurting what’s already there. So far the information I see seems to focus on adding new additional sites.
Clear step by steps or links to such instructions would be helpful.
Peace,
Gene
Should be easy enough to do with the export/import feature. Best bet is to use a full fledged back-up plugin (lots out there, both free and paid). Use that to export a full backup of your current subdomain (This will include anything in your upload folder and any database tables made by other plugins). You would then delete that sub-domain, and create the new sub-domain in WP 3.0 using the multi-site feature. Do it as a sub-domain, not a sub-folder; this will keep your navigation structure intact. Install the backup plugin you used to back up your sub-domain on your new subdomain and use its import feature to import the full sites’ info and data. If I missed something, anybody, please fill in!
I’m using a subdirectory rather than a subdomain.
If you go to my site, http://www.technightowl.com, when you click on the Newsletter link in the nav bar, you’re going to the second installation in the subdirectory. I think a few minutes will familiarize you with what I’m trying to do.
Peace,
Gene
Short version: Set up the main domain as a multi-site. Create the new site with a different subdirectory. Export the old blog, Import to the new site. Once it’s all there and working, remove/rename the old directory then change the site’s subdirectory.
I did this to combine several sites into one. Works okay, but I did have to manually edit some of my posts for broken image links and such. The Search Regex plugin helped me out a lot with fixing the data.
Installed on a test server and added the “define(‘WP_ALLOW_MULTISITE’, true);” in the config.php file, but not seeing “Network” in the Tools menu. Should I do a clean install?
Hey n00b. Try regular programing quotes instead of the “smart” quotes in the post… copy & paste fail.
No need to be rude, Ken. WordPress turns normal quotes into smart quotes by default. He probably didn’t type them in.
“This is quoted normally by me.” <-See?
A great life lesson here:
It’s always those trying to be clever who end up looking dumb…
This is actually an example of poor interface design. Instead of going to a config.php file to add the ability of allowing multiple sites, why not a simple checkbox somewhere in the Dashboard interface? Doesn’t anyone think these things through?
Peace,
Gene
Multi-site is a complex feature which requires administrative knowledge of DNS, Apache, how web servers work, etc.
Consider it to be a knowledge test. If you can’t edit the wp-config file, you cannot possibly do multi-site properly.
I edited the config file EXACTLY as instructed, and the fix did not work.
Were you born that arrogant? Or did you need to work on it?
Here’s a “knowledge test, ” Otto: how long does Auttomatic keep you on salary if you sneer at users looking for answers to straight-forward questions in, what looks like, your first foray into the public sphere?
Okay…
a) I’m not employed by Automattic. Really.
b) I was, in fact, responding to Gene, not to you.
c) I’ve been “public” on this sort of thing for a long, long time.
If you’re having issues, then perhaps I can help. Email me: otto@ottodestruct.com
err, I think you are misplacing your anger… Otto was responding to a different issue (and to a different person, Gene) then the issue you are having. You should apologize because Angry-Internet-Guy doesn’t often get helped.
He responded directly to me.
And excuse me, Kenny, but I ain’t “Angry internet Guy.”
I live fully searchable. I don’t hide behind an ISP.
If you looked for an answer on this, you’d find that originally, it was enabled by default. It was deliberately disabled to prevent those without a basic requisite level of competency getting into trouble. So, yes, everyone thought this through. Why would you assume otherwise?
Hi. Is it possible to for a single WP3 multisite installation to control blogs at two completely different domains, rather than in either subfolders or subdomains of a common domain?
IOW, is it possible for a single installation at domain1.com to control a site at domain2.com?
tks
ND: I wrote a guide telling you how to do exactly that: http://ottopress.com/2010/word.....-tutorial/
@ND the domain name mapping plugin mentioned in the comments here does just that.
How can we merge existing 2 blogs?
I’m thinking this thing should never have reached “ready for release” status. I’m an enlightened dolt when it comes to this stuff, but the only reason in the world I cared about this release–running multiple sites off one install– does nothing for me, even when I have to slap code into a config file to access one of its biggest features.
Tell Matt to get off the tour and start kicking ass.
I’ve been using 3.0 with multisite since alpha and I love it.
Now that I actually believe it’s stable enough for primetime, what is the ‘proper’ procedure for upgrading a wpmu 2.9.2 site to 3.0?
I’m guessing that some of the steps would not apply, as I already have a blogs.dir setup, and htaccess setup from mu.
Would someone please point me to the proper upgrading procedures?
thnx
I believe the procedure is “run the normal upgrader”. 🙂
They’ve been working on the mu upgrade path a lot in the last week or so. I think they hope to make it a straight no-changes upgrade.
For those of us running multiple TLD blogs in a shared hosting situation is running one copy of 3.0-multisite less resource-intensive than running multiple copies of 3.0 in single mode, all caches and other things being equal?
r
It’s probably about the same, resource-wise. There’s a very slight amount of overhead in looking up which blog it’s going to shows based on the domain name, but it’s extremely minor. And WP 3.0 seems much faster than 2.9.2 overall.
The advantage is really in just having it be very easy to add new sites and to administer them together.
If you want to use TLDs with Multi-site, I wrote a guide here: http://ottopress.com/2010/word.....-tutorial/
Great feature for WP 3.0
Great walkthrough. Thanks for all the time you put into this. Don’t worry about other commentators who seem to be ungrateful.
Looking forward to V3 and like more other people wondering if/when I’ll combine my two installs into a single install with multiple TLD.
define(‘WP_ALLOW_MULTISITE’, true);
folks ought to be careful copy-pasting that from the post, don’t work, need to manually type ‘ around the WP_ALLOW_MULTISITE bit.
THIS is exactly it. For anyone who doesn’t see the Network option in their Tools, manually type in the command line. Thanks, Patung, you saved me a headache.
ok…does this mean that one database has all domains in it?
or is it possible to have mutliple databases for all this domains and how?
I’ve just hosed my site on step 6. Neat.
I think I got it back. Never mind.
Question though: I’ve always used http://www.patricksays.net instead of patricksays.net, even in light of what the install recommended. Is it too late now without a massive amount of steps to make that change?
(I should probably take to WP Support Forums, but Otto seems to be here and he’s an expert.)
Thanks, even if no one answers. This is a great site.
I think that I followed all of the steps indicated, but do not see a SuperAdmin menu item. Any advice?
This is my current .htaccess file:
# BEGIN WordPress
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).*) $2 [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
RewriteRule . index.php [L]
# END WordPress
I also tried this without the # BEGIN WordPress and #END WordPress. It worked for me this way.
I found my mistake when implementing the changes. When I entered the code, I placed a comment entry, and forgot to close the comment. As a result, the new code in the wp_config file was disregarded.
Thanks for an excellent tutorial.
Unfortunately, I’m almost there. I have the SuperAdmin menu, and I can click on a site to create it. I get the e-mails, but the child site is not created.
I deleted the site, changed the WordPress .htaccess file as follows, and still do not get a site created.
# BEGIN WordPress
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).*) $2 [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
RewriteRule . index.php [L]
# END WordPress
Hi there and thanks for this blog. Made my life easier in getting setup.
One question. After installing the multisite option, i’ve noticed that my directory doesnt exist in the ftp.
So for example, i setup mysite.com/123, but the directory 123 doesn’t exist in the ftp.
When i setup a directory manually in wordpress using separate mysql dbs, i can always access all the wp folders in the directory, but these dont appear to be there.
Where are these now stored?
Thanks
They aren’t stored on the server anywhere – the blogs are *virtual*. they share the same file system.
Hello Andrea et al,
SUPER BASIC QUESTION.
Do the sites in a Multiuser network all have the same IP address?
Gary
Yes they do, and no it does not matter. 🙂
I haven’t tried multisite feature yet. I’ve been using WPMU and Buddy press for some of my blogs. Setting up multisite is always pain.
Most of the hosts don’t support Virtual Host by default, so you have to ask them to do so. I remember the first time when I was setting up WPMU on Hostgator, it took me weeks to set it up.
Subdomain is preferred over directory structure.
Thanks much for the tutorial. The multiple user blog can be something you see a lot in my field (Real Estate). I have been thinking about creating a multiple user blog platform.
Just changed servers and my configuration of WP from multiple installs using one database to a one install-network-on-one-database. My blogs consist of one domain and four subdomains of that main one. I feel that I am missing something key to get the installation to work properly. I can see the main blog, but cannot access my four subdomains. I will not be allowing others to register new subdomains under my WP network so, correct me if I’m wrong, I don’t need access to wildcard subdomains. Within WP I’ve created the info to make the four subdomain sites. In CPanel I’ve created the subdomains I need, but I did notice that they are pointing to subfolders outside the WP install (I perceive that herein lies the part of the problem). If I need a static IP, that may be an issue. I want my sites to garner their own pagerank not to be viewed as mere extensions of the main domain (why I am not using subdirectories).
One thing you mention in your tutorial is: “If your host supports it, you’ll have the option here to choose between subdomains and subdirectories.” How do I know if my host supports it? What do I need to look for or ask? Would it be better to switch to subdirectory installation and use the domain mapping? Or does that require a static IP? If I do this should I erase the subdomain records in my CPanel and change the CNAME/ANAME records with my domain provider? As you can tell I’m kinda stuck and very confused. I feel like I am missing the keystone to my bridge – both sides are done but the part that ties them together is gone. It may just be a lack of understanding on my part how they are supposed to communicate together, but I’m stuck nonetheless.
Ok, I did everything as you said in your tutorial, I had no .htaccess file in my public domain directory, so I created a blank text file and pasted there the code
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ – [L]
# uploaded files
RewriteRule ^files/(.+) wp-includes/ms-files.php?file=$1 [L]
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ – [L]
RewriteRule . index.php [L]
but I can’t see any Super Admin Menu. I use WP 3.3.1