Moving mod_pagespeed’s file-based cache into RAM
Google's mod_pagespeed does a great job at optimising web resources such as HTML, JS, CSS and even images.
I use it on a lot of customer production sites as a great partner to APC cache for super fast web sites.
I won't go into details on how it works, if you're reading this, you already know!
mod_pagespeed caches resources to disk. If you are running on a heavily loaded server or a VPS, disk IO is a premium.
So we should really cache to memory, its faster, cheaper and easy to set up.
[Snippet] Setting the timezone for PHP 5.3
PHP 5.3 requires a time zone to be set if you do any kind of date processing.
Simply set this in your php.ini
New Client: The Spa @ Dolphin Square – Moroccan Inspired Luxury Spa In London Pimlico
My first MODX site in quite a while. The Spa @ Dolphin Square - Moroccan Inspired Luxury Spa In London Pimlico

Working from PSDs I was tasked with turning them into a fully working MODX Revolution CMS. Fully template driven and with everything configurable from MODX to make one highly configurable and visually stunning site.
Using Persistent Cache in WordPress (with APC)
Ever since WordPress 2.5, the WP Cache functions haven't been persistent, so the cached objects are only available for the page load (or script run). This means that data stored in the cache resides in memory only and only for the duration of the request.
Upto version 2.5 we could have simply added define('WP_CACHE', true) to the wp-config.php and we got persistent cache features. This is no longer the case and isn't really very well documented.
The later versions need a Persistent Cache Plugin. I'm not a fan of some of the larger caching plugins like W3 Total Cache or WP Super Cache as they tend to add complexity and can cause other problems. Besides, as developers, we're better off writing the code ourselves.
Before going any furuther its probably worth pointing out WordPress has two persistent caching methods.
The first method is the WP Transients API,
- Not much documentation
- Only allows caching of objects to the database so may not be faster
- http://codex.wordpress.org/Transients_API
The second method is extending the existing WP Object Cache that is currently throughout your WordPress site already.
- Extending this object is much more flexible
- Can extend into APC, memcache or similar
- Provides a fast cache for basic WordPress functions even before you write your own code
MySQL 5.0 or 5.1 to 5.5 Upgrade Traumas on CentOS
Ignoring all the panic-mongers on the rest of the internet upgrading MySQL from 5.0 or 5.1 to 5.5 shouldn't be that difficult. My task was to upgrade from 5.0 to 5.5 on CentOS (Remi Repos). It was to fix a bug with MySQL 5.0 ignoring the wait_timeout parameter in my.cnf.
Five to five on a Friday, I dive into the swamp, which turns out to be full of alligators.
Alligator 1: Version depenencies
Alligator 2: /usr/libexec/mysqld: unknown option '--skip-locking'
Alligator 3: [ERROR] Error message file '/usr/share/mysql/english/errmsg.sys' had only 481 error messages,
but it should contain at least 641 error messages.
Or some other variation of numbers.
Install the Remi Repo in CentOS
The Remi Repo is a yum repository maintained by a French dude - Remi Collet. It contains much more up to date packages (January 2012) such as MySQL 5.5 and PHP 5.3.
Heres how I installed it on CentOS.
New Site: GamerNode – WordPress Site Migration
I recently had the pleasure of working with a well respected gaming news site - GamerNode.
My challenge was to convert their existing outdated, custom coded CMS (and database) into WordPress.
I did this with a selection of custom scripts and image downloaders to help smoothly migrate from old to new.
Contact me for more information on WordPress Site Migrations.
New Site: HSS Blog
I was recently commissioned to code a new WordPress blog for the national hire company HSS Hire. Their new blog features excellent articles from DIY, gardening and hiring professionals for the job. See http://blog.hss.com/ for the new site.







