WordPress network on Dreamhost

Recently I have started deploying more and more versions of the WordPress code base for different projects that I have been working on, and a couple of them have been network (multisite) installs.  For those who dont know what a multisite install is, well it allows you to run several instances of wordpress off a single codebase.

There are two ways [out of the box] that a network can run:

  1. Sub directories
  2. Sub domains
If you choose option 1 then when you create a new site it will appear at example.com/newsite, this is very simple to set up, as it uses mod_rewrite to make them appear in the sub folders.  The sub domain option makes sites appear at newsite.example.com.  This, in my opinion is a nicer way of doing things, but it requires that you have the ability to have wildcard DNS for your domain.  Unfortunately this is something that Dreamhost do not provide yet.

But all is not lost

If you log into the excellent Dreamhost panel to administer your account then you can set up your domains, you can follow these steps to get the new site hosted.

  1. Log into Dreamhosts Panel
  2. Click Manage Domainsmanage domains
  3. Click Add New Domainadd domain
  4. Scroll down and fill out the Mirror Domain form. Enter the new wordpress site into the “Create the mirror at” field, and choose the main wordpress network address from the dropdown for the mirror this site field. Finally click mirror this domain.Mirror domain
  5. You should see the success notification.Success

Sit back and relax

Thats it, all done, your new WordPress network site is up and running on a sub domain. Its obviously not as nice as the domain magically appearing out of thin air, but on small-medium sites where you control the setting up of network sites manually you can do this at point of creation.

Thats not all folks

If you also take the time to install the WordPress Domain Mapping plugin, then you can use the process above to host completely different domains off of a single wordpress codebase. How cool is that.

Who needs iCloud?

There have been a lot of people talking about how great the new Apple iCloud is going to be, and whilst I agree that it will be useful, it is nothing new. Also, if you have an older phone (like me) you wont be able to benefit from it as apple are no longer getting iOS updates.

I use Google Apps which provides me with the mail, contacts and calendar syncing. I have to say it is an excellent service considering its free. Once you have activated mobile support in the Google Apps admin, its a simple configuration exercise to get everything synced over the air.

Connect your phone to Google using exchange as the protocol. You can get more info on how to do this by going to http://m.google.com/. When you have entered your details, select what you want to sync out of Mail, Calendar and Contacts. (I sync all three)

You now have your phone set up (and backing up contacts) to the cloud. Now to get those contacts into your mac. Simples. Go to address book preferences, and select accounts.

Apple Address book and Google

Tick the box next to Synchronize with Google and click on the configure button.

 

Thats it. You can then head on over to iCal to get your calendar synchronised too.

Updating PHPUnit

fail whale by Yinying Lu http://www.yinyinglu.com/I recently updated my Ubuntu VM to 11.04, and PHPUnit stopped working.

This is the error that I was getting.

PHP Warning:  require_once(PHP/CodeCoverage/Filter.php): failed to open stream: No such file or directory in /usr/bin/phpunit on line 38
PHP Fatal error:  require_once(): Failed opening required 'PHP/CodeCoverage/Filter.php' (include_path='.:/usr/share/php:/usr/share/pear') in /usr/bin/phpunit on line 38

There were lots of talk on Google about people who suffered the same problem. It took me a while to work out what was going on

It turns out that somewhere along the way the dependancies of PHPUnit have changed and I needed to update the PEAR packages (including the root PEAR installer) and add a couple new ones too.

This should get you back on track if you are having the same problems.

sudo -s
pear channel-discover pear.phpunit.de
pear channel-discover pear.symfony-project.com
pear channel-discover components.ez.no
pear upgrade-all
pear install --alldeps phpunit/PHPUnit