I previously ran my WordPress blog on an OS X client operating system. I’ve just bought a new Mac Mini running Snow Leopard Server to replace the old Mac Mini.
In theory it should be a lot more straight forward on the Server version of the operating system as everything you need is pre-installed. In practice, once you know what you need to do, it’s quite simple – but finding these things out is not so simple. In the hope this will help others here is my 4 step plan for getting Snow Leopard Server ready for WordPress.
Step 1 – Enable Short Open tags in PHP – otherwise you will likely see blank screens in your Web browser and errors like this in your Apache log: “Parse Error: syntax error, unexpected $end in …..”. Search for “short_open_tag” in /private/etc/php.ini and change it so it reads “short_open_tag = On”
Step 2 – Enable MySQL – Although it’s pre-installed, it’s not running by default and it’s not necessarily obvious if you are new to Snow Leopard Server, what to do to enable it. Open Server Admin and make sure your server is selected. Then click on the [+] icon in the bottom left corner and choose “Add Service”. Find “MySQL” and select the check box then press [Save]. After this if you click on the triangle next to the sever name it should expand to show a list of services including MySQL. Select MySQL then the Settings Icon. Here you can enable network access, set the Root password and finally click on the [Start MySQL] button at the bottom of the window.
Step 3 – Enable re-writes – required for Permalinks to work. Still in Server Manager – click on “Web” in the list of services and then click on Sites. if you are not using Virtual Hosts – just select the default site, otherwise create your virtual host and keep that selected. Next, click on the “Options” button for your site and check the box next to “Allow All Overrides”, then press [Save].
Step 4 – Enable PHP5 – Still on the Web Service in Server Manager, select “Settings” and then click on the [Modules] button. Scroll down and find “php_5_module” and click on the check box to enable it. Press [Save] and then stop and start the Web service using the button at the bottom of the window.
And that’s it – your server should have everything it needs to install a working WordPress Blog
This will allow you to get WordPress running on your server but there are other things that you should consider that are out of scope of this post, like NOT using your root user in MySQL for the WordPress database.
if you didn’t enable the Web service or SMTP mail as part of the install – you can enable them in the same manner you enabled MySQL.