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:
- Get latest XAMPP version: it bundles together php, MySQL, Apache and Perl - easy installation, install it. If Apache won't start, check if some other program is using ports needed for Apache.
- 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)
- In your web browser go to simple.trick and install your program. If you install in a sub-directory, you may come upon an error where Wordpress MU install does not create wp-config.php file, fix it and continue.
- Input all needed information and finish your installation.
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.