Measuring WordPress Performance with New Relic RPM: Applying a Controller Model

By Posted in Product Updates, Tech Topics 16 December 2010

WordPress is kind of a big deal. Powering 12% of the top 1MM biggest websites and many Fortune 500 sites, WordPress makes launching blogs and CMS-based web applications incredibly simple.

But for the many organizations that host their own WordPress instances, measuring and improving the performance can be confusing. WordPress is very extensible and by installing any number of the 12k+ plugins and 1k+ themes, your WordPress site becomes your own. But this ease of extensibility can come at the cost of degraded performance.

Let’s take a look at how our PHP agent can help you understand how your WordPress site is performing so you can make your site faster and your readers happier.

Monitoring WordPress “Controllers”, not just URLs

WordPress does not follow an MVC pattern, but it can help to think about WordPress templates as Controllers to better understand the performance of your site. Seeing the application performance for a single blog post isn’t very useful. If we displayed metrics for every distinct URL, you’d have hundreds or thousands of metrics, all with very similar performance with variable throughput. Instead we can monitor the performance of all posts as a single metric, just as you might want to know how your “category” and “tag” pages perform.

How can we tell which template file(s) WordPress will use when it displays a certain type of page?

Here is a visual overview of which PHP templates are called to match a specific URL in a WordPress app. Using this guide we can see that an individual blog article would be served by the single-article.php template file. By monitoring at this template level, we can see how all blog articles are performing, rather than tracking down the performance of hundreds or thousands of individual blog posts. By monitoring WordPress “Controllers”, we get a breakdown of where we spent our time in order to deliver content. Seeing this breakdown of database time, PHP rendering, Memcached use and external API calls, we can begin tuning and improving WordPress performance.

Stay Tuned! Next week we’ll discuss how to configure our PHP Agent to monitor Controllers in custom PHP applications.

About the author

brian@emphaticsolutions.com'Marketing at Github

Tell us your thoughts Or Send us an internal high five

Talk to @newrelic