Get your FREE 30 page Developing SOLID Applications guide!

TEK Webcast Notes

Last Friday, I did a webcast as a part of the PHP TEK Webcast series. The webcast was on Caching for WordPress. We had a good turnout, and there were lots of questions about the best plugins to use for WordPress caching.

For me, every WordPress blog should have APC installed on it, hands down. APC almost doubles the response rate for WordPress by itself; APC is easy to install and freely available, stable and exceptional. Along with APC I also recommend either WP-Super-Cache or W3 Total Cache. WP-Super-Cache is great for sites that simply want to do static caching; W3 Total Cache is for sites that want to make use of S3 or other caches (like the APC User Cache).

(more…)

“Micro” Optimizations That Matter

Every few weeks, someone publishes an article talking about how it’s faster to use single quotes rather than double quotes and how you should use echo() instead of print(). Most of these are bunk; that is, the time we spend talking about them far exceed the CPU time saved by implementing them.
(more…)

To stat() Or Not To stat()?

The Alternative PHP Cache (APC) is a tool that offers a massive performance gain to almost any PHP application simply by turning it on. This extension to PHP provides both opcode caching and user caching, placing files and data into memory for fast retreival, and, if used correctly, eliminating some of the bottlenecks of the file server or database.

Turning APC on is a great way to get a performance boost, but there are ways to help improve APC’s performance.

(more…)

Benchmark Early and Often

This past week I had to deal with a new concept: a client site that failed due to excessive load. Most of the week was spent optimizing the site by doing the critical components: installing APC, ensuring that our caching (Akamai) was satisfactory and properly configured, and making performance improvements.

But one thing that became very important was the benchmark test. Using ApacheBench, we identified the blind spots, weak spots, and bottlenecks in our web server (WordPress…duh) and worked to address them.

(more…)