Local WordPress MU install with subdomains

Sometimes one just needs to install WordPress MU with subdomains locally. Now, most of the processes here are identical to simple WordPress or Joomla install too. The one action needed for WordPress MU install only is getting subdomains to work.

So, here is step by step instruction:

  • Go to it’s administration panel. Check that MySQL and Apache is running. Clicking on “Admin…” button for MySQL will lead you to phpMyAdmin interface for your MySQL install. Make databases and users to fit your needs.

  • Either manually or using some program edit your host file. I use HostsXpert from funkytoad.com. Put there the following code:

127.0.0.1  simple.trick

Now, you can change simple.trick with anything you want. Still, it’s better if you change it to something what isn’t a valid web adress: you may want to access it later.

  • Download your WordPress, WordPress MU, Joomla or other program you want to run, unpack it and put the files inside htdocs folder (inside your XAMPP install)

Now, for WordPress MU with subdomains you need to do one more step:

  • When install subdomain, input subdomain address inside your hosts file, like this (if your subdomain name is: subdomain).

127.0.0.1 subdomain.simple.trick

Note that you will need to repeat this step for every sub-domain you create.