The final stage in speeding up my blog was to add some serious caching to the front of it. This may even have been overkill, because it was already pretty swift under nginx/php-fpm, but cutting out the database connections would speed it up even more.
I had a quick go with the W3 Total Cache WordPress plug-in, but it seems rather biased to running Apache (which I’m not) and I experienced some strange errors that I failed to immediately fix. Rather than wrestle with it, or try other WordPress caches, I decided to get to grips with Varnish. This is something I’d been meaning to do for ages, and of course it isn’t limited to WordPress – Varnish is a fabulous caching solution for whatever site you’re building.
Read more…
As part of my “speeding up my blog” series, I planned to write a nice, informative post about upgrading to WordPress 3, deploying your theme to a CDN, and getting it all running under nginx. Unfortunately WordPress irritated me so much in the process, that this has turned into more of rant. Sorry in advance.
I have a like/hate relationship with WordPress. That is to say that it does a lot, it has a great admin area and there’s a large community producing themes and plug-ins. However, I am a PHP developer of many years, and every time I come into direct contact with the core WordPress code-base I end up being sick in my mouth.
Read more…
«« See previous post for getting nginx up and running. This post is about getting PHP running as a FastCGI.
Speeding up my blog
Performance issues aren’t just for high traffic sites. I’m lucky if I get 50 visitors a day to this site, but by using scaling techniques popular with the big boys, I figured I could increase page load speeds, (good for visitors and good for SEO). If I could achieve this and use less resources, perhaps I could even save some money on my hosting bills. I currently run a 512MB VPS on Slicehost, and I’d rather not increase this right now.
With a few days off work, I decided to take the plunge and swap out some of the server tech powering this blog. From the bottom up, so to speak, this was as follows -
- Replace Apache with Nginx (below)
- Upgrade to PHP 5.3.3 and run as a FastCGI (next post)
- Upgrade to WordPress 3
- Deploy a CDN
- Add a Varnish cache for extra speed
I’ll go through my experience across a number of posts, starting with Nginx. I shan’t replicate any existing documentation; I’m just going to go through what I did and point you at the resources you’ll need.
Read more…
My much neglected personal project JASPA has been taken offline. All traffic to jaspa.org.uk is redirecting here for now.
Read more…
After nearly two years I’ve finally gotten around to releasing my PHP JavaScript parser, although documentation is still thin on the ground.
The library has been split in two:
- jTokenizer – A JavaScript tokenizer designed to mimic the PHP tokenizer.
- jParser - The fully blown JavaScript syntactical parser which generates a parse tree.
Read more…
The day a thousand apps stool still
I noticed some weeks ago that Twitter’s OAuth implementation didn’t appear to be verifying signatures. I knew this because I purposefully set an invalid access token which was accepted unconditionally. I thought this was odd, but as a newbie to OAuth I was just happy that my app was working, so I filed the problem at the back of my mind under “deal with it if it becomes a problem”. Today (the week I release by beloved TwitBlock app) it very suddenly became a problem.
Read more…
If you know about the Qwitter service, then you may also know what people say about it – that it plain doesn’t work. So for my first Twitter app, I decided to make one that does.
I have been made aware since then that there is also Twitdiff, although I haven’t tried it at time of writing.
If you don’t know about Qwitter, it’s a service that monitors your Twitter followers and emails you if someone unfollows you. My app currently tweets the notification instead, so everyone will know you’ve been qwit.
I’m not offering my app as a public service [yet] I knocked it up in 2 hours and if you know what you’re doing with a LAMP set-up you can download it and run it yourself.
» Download qwitter 0.1.2
Requires PHP >= 5.2.x + json extension, MySQL >= 5.0.45
I’ve knocked up a really simple command line tool for interacting with the bit.ly API.
It’s simple because:
- The output is currently pretty raw
- The bit.ly API doesn’t actually do very much
» Download version 0.1.1
Requires PHP >= 5.2.x + json extension
Microsoft slurs, geeks and bean bags
On Friday I was at PHP UK Conference 2009, thanks to my boss, and a charming discount from the Facebook Developer Garage. Here’s what I thought.
The biggest presence here was undoubtedly Microsoft, followed at a distance by Adobe. Zend had a very small stand and don’t appear to have been a sponsor. I found this a little odd from the outset, but I guess it’s the big corporations that have the cash, and can ensure they don’t miss a single conference. Microsoft bribed us with the usual toys: XBoxes, the magic table thing … you know the drill. I was of course there to hear about the future of PHP, particularly PHP 6, and why we’re still just a cool as Python and Ruby.
To save you skim-readers the full breakdown, here’s my conclusion up-front: All in all a good day, but I wanted more talk of PHP’s future and could have done with less of the Adobe stuff. Most of the speakers were great, even if the subject matter missed a bit in places. Also, I know we’re trying to save the planet and everything, but could Olympia please turn the heating on next time!
Read more…