It is essential to be able to monitor and quickly identify the performance bottlenecks for running WordPress sites smoothly. While there are a number of tools that can be used, we find New Relic Application Monitoring (APM) to be one of the best, and it’s FedRAMP authorized. New Relic APM is a tool that identifies the inner workings of WordPress sites by drilling down to pinpoint plugins, theme template files, database queries, external calls, and/or coding errors causing performance issues on WordPress websites.
New Relic organizes the key metrics into a series of charts and graphs which we can quickly use to diagnose the website’s performance issue – a key factor when working with mission-critical sites.
We can debug a WordPress site using New Relic APM by using the following tools in the New Relic dashboard:
The summary dashboard provides a quick snapshot of the overall performance of the website. Rather than a specific diagnosis, this dashboard shows a compilation showing how PHP, MySQL, Redis and external calls are working together, which can eventually point to the right direction.
The transactions tab is a useful tab in New Relic which helps to identify which particular template or page is slowing down the whole site. It gives an overview of which particular action in php is causing the site to slow down.
Of particular interest within the transactions view is the list of slow transactions, which helps to drill down into which page template in particular is causing the WordPress site to slow down.
In the example above, the site is taking a long time to load the individual blog post. Other pages are loading at a normal speed. The lower right corner confirms this delay, which when clicked takes us to a Transaction trace screen which gives us even more detail of that particular transaction. In this case, one particular external link is taking a huge time resulting in a very slow overall page load time. Trace details tabs give further detail on what exactly is happening.
3. WordPress Hooks
The WordPress hooks tab provides a visualization of the time consumed by all of the PHP functions triggered via WordPress action hooks. This information can be useful in identifying the functions firing the hook.
4. WordPress Plugins and Themes
The WordPress plugins and themes tab helps to find which plugins and active theme are consuming the most amount of time. If a single plugin or the site theme is consuming a dramatically outsized amount of time, this page can help us quickly spot the plugin or theme causing the issue.
For the example below, shortpixel-image-optimiser and aryo-activity-log are the plugins that are taking a lot of time to load, which might have caused the overall slowness of the site. In this case, it was indeed aryo -activity-log plugin which was logging a lot of failed login attempts that was slowing the site down, which was why we had to remove that plugin. However, only looking at this New Relic tool is not deterministic, and we should also check for other tabs like Databases, Transactions, WordPress Hooks and External Services, which may also be contributing to slowing down the plugin. So, basically while analyzing New Relic metrics, we need to take into consideration multiple factor and analyze all of the resources and component before coming to a decisive conclusion.
The databases tab lets us identify the database tables and types of queries consuming the most time. New Relic ties this information back to the transactions making those queries. We can use this information to identify database tables which may require optimization and template files which are placing an outsized load on the database.
Also on the lower right bottom of this tab, we can see which query specifically is slowing the site down, and dig in from there. Further digging down in, we can figure out where this database query is being invoked at and debug accordingly.
6. Error Analytics
Error analytics tab shows the PHP errors and warnings in the site, which can be traced back quickly to identify the root cause of the problem. Selecting a specific error lays out a full stack trace for the transaction that generated the error. Errors are tied back to the actual transactions that generated the errors and are grouped in classes. That way we can quickly see how many different types are being generated.
Usually, if a specific page is slowing down, then, we check the transaction tool to see which particular page is causing a lag. And if the whole site is slowing down, then we can look at WordPress Hooks tab, WordPress Plugins and Themes tab and Databases tab in unison before coming to a definitive conclusion.
In this way, we can debug the WordPress site using the combination of various tools and visualization that New Relic offers. To get the most out of New Relic, we should also have a good familiarity with WordPress and PHP in general and should be able to understand the information portrayed in each tab, and how these information are interrelated.
Get started with a secure managed Google Cloud™ hosting solution today for your WordPress site.
With Materiell, you can leverage our team of experts to power your WordPress site on a secure Google Cloud™ hosting environment. The Materiell team can help you secure and manage your WordPress site with New Relic APM on the Google Cloud™. We use an experienced web and dev operations teams along with an end-user dashboard to help you create, develop, and manage WordPress sites.
If you’d like to learn more about how you can get started with Google Cloud™ for your enterprise WordPress site, contact us today.