Install WPMU on localhost with Xampp
I recently wanted to install WPMU (thats WordPress Multi User) locally and had a tough time in the process.
I finally got it worked out and like most things, it is actually quite easy if you leave out all the stuff that gets you in trouble.
I use Xampp to run apache locally, but I assume this will work with any out-of-the-box localhost server installation.
Here we go…
1) If you are a veteran wordpress installer, what is the first thing you do when installing a fresh version? Mess with config.php, right? Well, turns out, for WPMU this will cause you all sorts of headaches. DO NOT edit the config file. Let the installer do it for you. So step one is “do nothing”.
2) WPMU can’t be run on localhost. It needs to run on something like localhost.localdomain. To make this happen, go to windows/system32/drivers/etc/ and open a file called host. This file has no extension so don’t let that fool you.
3) At the end of the host file add the line: 127.0.0.1 localhost.localdomain and hit save.
Thats it. no apache reboot or anything. Now go to your wpmu install folder and the config window should open. Plug in your db values, select the “new blogs as sub folders” option and hit submit.
I have only installed this on a few pcs, never a mac so I can’t tell you how to add localhost.localdomain
Thats about it. Pretty easy, right?
Let me know if this is helpful for you.
Related posts:
- Fun with the windows host file tweetmeme_url = 'http://mattkern.com/install-wpmu-on-localhost-with-xampp/'; Does apple.com use apache? It does...
- Blank screen when installing Wordpress 2.5 tweetmeme_url = 'http://mattkern.com/install-wpmu-on-localhost-with-xampp/'; As I said I am slowly...
- WPMU Manually Approve New Members on Local Install tweetmeme_url = 'http://mattkern.com/install-wpmu-on-localhost-with-xampp/'; We had the conversation yesterday about...
If you enjoyed this post, please consider to leave a comment or subscribe to the feed and get future articles delivered to your feed reader.
Comments
Will, my lone commenter!
I have had that same problem. I have looked at running mercury on localhost and found a few resources but they are pretty intense and I haven’t taken the time to figure that one out yet.
Mercury is the mail server that is bundled with Xampp but as I said, I have never gotten it to work locally.
I am sure I will look into it in the future, but for now I am just going to be using the wpmu install for my own personal dev’ing.
Lets keep each other posted if we find the magic bullet, eh?
So I actually did figure out a bit of a workaround for setting up test accounts.
First you sign up an account, then if you go into your database tables with phpMyAdmin to wp_users (or whatever your prefix is) and find the user account you just signed up, you can copy the user activation key from the “user_activation_key” column. Then you just go to an address like this:
localhost.domain/wpmu/wp-activate.php?key={key}
(replace {key} with the actual activation key)
Of course this is a bit of a pain, but at least it allows you to register test users.
Thats cool, thanks.
I was actually in phpmyadmin looking at the key and didn’t think about manually creating the url.
Good call, Will!
Thanks, and thanks for the hat tip on Twitter
I bet you could also write a plugin to do this… Hmm, I’ll have to look into that. I’m sure there’s a user registration hook I could use to automatically verify users (if nothing else it could make an HTTP call to that URL).
I just tried it but the table names were a little different. I think it is because I am using BuddyPress (which is installed on top of WPMU)
For buddypress the table is wp_signups and the field is activation_key.
The URL is still /wp-activate.php?key={key}
Good stuff.
>>Thanks, and thanks for the hat tip on Twitter
Sure, sorry I had to use your good idea to get traffic to my blog
No problem. You’ve got a good article here, so whatever it takes
Now I’m thinking about doing a full writeup (and maybe even a plugin release) about the user activation issue, so then everyone can win
Yes, you’ll need something else to run the email so the activations are sent out. Um, but if it local is it not closed to the whole internet?
Were you just testing the activation, or are you running it off localhost?
Because you could just add a bunch of test blogs from the backend.
Also, BP uses MU’s signup table, it doesn’t add any extra.
Hey Andrea,
I just found your site today. It looks great. Can’t wait to dig into it a little more.
Installing it locally was mostly for dev purposes, but I was toying with the idea of setting one up on my companies intranet.
As WPMU has no privacy settings I couldn’t use it as an inner-company solution on a public site.
Also, the key is in a different table. I double checked it today as I was talking to Will.
I just downloaded the most recent BP so maybe something has changed there?
Actually Matt, I might have actually had the wrong table at first. I have about 10 different instances of WordPress installed on a local database, so I probably just looked at a table from another instance.
Hello. ![]()
I found this little tut through google…
I thought it would work, but I am still a 500 Internal server error message.
The DB etc is all correct.. I am new to installing things on a local host.
The normal Wordpress install did work, I had that running for awhile but I want to create a community thing.
Please can you help me? Or point me in the direction? Please and thanks.
Hey Jana, I will admit my directions are a little thin. My 3 points are mainly for getting localhost.localdomain working on your pc.
Can you use localhost.localdomain with a normal wordpress install? like http://localhost.localdomain/wordpress
if that part works, I would check out @andrea_r ’s tutorial for actually installing wpmu. It is very extensive.
For a local install, you can probably start at the section called “now we can really install” after you set up your db.
Just be sure to select Sub-directories (under the heading Blog Addresses) as I don’t know how to deal with blog subdomains on a local install.
Hopefully that helps.
Also, the internal error is 99% of the time the .htaccess file, FWIW
How do I edit that ‘hosts’ file? I opened it in notepad but I couldn’t save it back to the directory…I should be logged in as ‘admin’, the dialog error mentioned something about admin access…do you have any ideas?
Hey Jeff
Yea, if you are running Vista you have to edit the file as an admin. If memory serves me correctly, you right click on the file and it gives you an admin edit option there? If thats not it I can check on my laptop when I get home.
HEy Matt, thanks for the wonderful post. I had been searching google and the WPMU forums for long but couldn’t get anything. You rock!
I can`t get it working. I will not create the wp-config file. If I do it manually, then I just get many weird error messages. And yes I did create the entry in the host file. Can you help me? Thank you!
sorry Budy, I got it : http://wpmututorials.com/installation2/installing-in-a-subfolder/
sorry for spam.
Yea, that one got me too the first time I tried a subdirectory install. Hope you got it figured out faster than I did!
Thanks for the tutorial..
I summarized from several sites for general step by step guide here http://watik.isgreat.org/web/wordpress-%c2%b5-mu-on-xampp-localhost/
I hope can be useful to for anyone.
Thank you soooo much! This is exactly what I needed. Perhaps you should add it to the WordPress Codex for MU?




The problem I’ve always had with local installs of WordPress MU was with sending emails. I’ve usually used WAMP, which doesn’t come bundled with an email server, so maybe that’s my problem. Did you get email to work properly (for user signups and so on)?