WordPress MU Local Installation

Resovling Domain Names Locally

Wanna try WPMU on local machine? If you use localhost or 127.0.0.1 as the server address directly, you always get a message similar to the following:

Do not use an IP address (like 127.0.0.1) as your server address. Do not use a single word hostname like localhost.

That means a FQDN is needed, the good thing is that it’s easy to resolve domain names virtually locally. Open the hosts file:

  • C:\WINDOWS\system32\drivers\etc\hosts (Windows)
  • /etc/hosts (Linux)

Add or modify something, and make sure there is a line like the following in the file:

127.0.0.1    localhost hys.lan bloga.hys.lan blogb.hys.lan blogc.hys.lan blogd.hys.lan

Here, hys.lan is used to install WPMU, blog(a-d).hys.lan are addresses for testing, I’ll use these four to create weblogs.

Configuring Apache

Make sure two things:

  • Apache is listening on port 80, because WPMU doesn’t support server address with port number.
  • mod_rewrite is enabled.

Then adds a virtual host section:

<VirtualHost *:80>
  DocumentRoot /opt/wordpress-mu
  ServerName hys.lan
  ServerAlias *.hys.lan
  <Directory "/opt/wordpress-mu">
    AllowOverride FileInfo
    Order allow,deny
    Allow from all
  </Directory>
</VirtualHost>

Preparing Database

Create an empty database, and grant permissions to a database user.

mysql> create database wpmu_db;
mysql> grant all privileges on wpmu_db.* to wpuser@'%' identified by 'thepwd';
mysql> flush privileges;

Installing WPMU

It’s very easy to get WPMU up. Open your browser, and type the server address, in my case, it’s http://hys.lan. Provide the required information, and press the “Submit” button to go. Waiting for a while, WPMU is installed and runs successfully.

This entry was posted in WordPress. Bookmark the permalink.

6 Responses to WordPress MU Local Installation

  1. blackwhite says:

    Hehe, you really started testing this tool to upgrade the forum. Good luck.

  2. richard says:

    of course. our forum needs something new indeed. wpmu is the first one in my candidates list.

  3. trendless says:

    So that’s great if I’m testing wpmu from the same machine it’s installed on (believe me, the simple, explained steps was AWESOME to find after trolling the net all afternoon), but what if I wanna set it up on a (linux) virtual machine hosted on another machine on my lan and then access it from my Windows workstation? Do I have to setup a full-on domain? B/c I can’t seem to get to it. I tried using [something].[something] but it wouldn’t bring it up. Then I went back to using a single-word servername and it told me, “The blog you have requested is not installed properly. Please contact the system administrator.” I’ve got several virtual web servers set up to serve me different things like my web based accounting software and other CMS’s, but WordPress seems to be different. Ideas?

  4. trendless says:

    You know what, I think the last issue I mentioned was something entirely different… I just dropped the MySQL database I’d been using and re-created it fresh, then configured wpmu from scratch and it’s working.

  5. Puge says:

    Thank you for this post. For so many hours spent making my WPMU work on my local server, i finally did it. It works like a charm now.

    Maybe i should change my practice on not putting a tld on my local virtual hosts.

    Thanks Man!!!

  6. Anes P.A says:

    Hello Sir,

    I Install WordPress MU . Installation is Success,
    But When I create a user Blog eg: it’s name is firstone then the
    url is : http://localhost.localdomain/wpmu/firstone/ But when I visit this page I got a 404 page Not Found Error. How it can Avoid? As an Experience I copy all files in /wpmu installation Folder to this /wpmu/firstone folder. Then I got the page, but When I click some
    links like Comment , I got another page Not Found 404 Error.

    Sir , please Give a Work arounf for it …. I know Copy the Content to
    new folder is not a Solution….. I am working in Red Hat Linux Fedora
    Core 8 PC …. ok I am waiting your Reply… Kindly give a Solution as Early as Possible…..

    Is me need to Edit any system File ?

    You can contact me : anes.pa@amskape.com

    With Great Regards
    Anes P.A

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="">