Performance and monitoring
PHP X-Ray: find what makes your site slow, step by step
Working out why a site is slow or what is causing high CPU usage can be very difficult. X-Ray makes it simpler: for a time or a number of requests you choose, it analyses every PHP request on your site in depth and tells you how much time each plugin, each SQL query, each PHP function and each call to external servers has taken. With that, you know exactly where the problem is.
Create a trace
-
In cPanel, open X-Ray App.
-
At the top right, click Start tracing.
-
Choose the domain you want to analyse.
-
In Specify mask, enter which addresses to analyse:
- A specific page: for
dominio.com/direccion-lenta, enterdireccion-lenta. - The home page:
/. - All pages:
*. - All pages that start with a path: for
dominio.com/clientes/acceso,dominio.com/clientes/comprar, etc., enterclientes/*.
You can also use
?and[]; the form's How to use special characters? link explains how.
- A specific page: for
-
By default X-Ray analyses a small number of requests that match the pattern. To analyse more requests or for longer, click Advanced settings and adjust it.
-
Click Run.
The trace appears in the list. X-Ray does not generate visits: it waits for someone to load the pages. If it is a page with few visits, open it yourself in the browser a few times. When it reaches the set number of requests or time, it stops on its own; you can also stop it earlier.

If the page you want to analyse is served from cache (for example, from LiteSpeed Cache), PHP does not run and X-Ray records nothing. Analyse the page while logged in to WordPress or purge its cache first.
Read the results
You can wait for it to finish or look at the requests it has already analysed as it goes. They appear in a list you can sort by execution time, with the slow ones flagged first.

When you open a request you will see:
- The total execution time.
- The exact URL.
- The site's plugins or components and the time each one has taken.
- Calls to external servers and how long they took.
- SQL queries, with the file they come from and their time.
- The PHP functions that take the most time and where they are in the code.

You can download the report as a PDF to send to the developer of the site or plugin.
Some typical cases:
- One plugin takes most of the time: deactivate it and check whether the page improves. Look for an alternative or update it.
- An external call takes several seconds (an API, a licensing service, a feed): the site waits for that server on every visit. Review the plugin that makes it.
- An SQL query takes a long time, or a fast query is repeated hundreds of times: it usually points to a table without an index or a badly written plugin. If it is
wp_options, see the wp_options table and autoload data.
Things to bear in mind
-
X-Ray slows down the requests it analyses. Analyse few requests, for a short time, and stop the trace once you have the information.
-
If the account is reaching its CPU or memory limits, the times are distorted. X-Ray flags this on the affected request so you can take it into account.

-
X-Ray measures what happens on the server. The time the browser takes to download images or run JavaScript can be seen in PageSpeed Insights.
-
The report may include your site's URLs, queries and parameters. Review it before sharing it.
You may also find useful
- Google PageSpeed Insights: what it is, a practical example and fixes What PageSpeed Insights measures, what LCP, INP, CLS and the other metrics mean, and how to fix its...
- Interpret response time in PageSpeed, Pingdom and GTmetrix Tell apart TTFB, HTTP waiting time, latency and full load, and compare locations and caches before b...
- Setting up website monitoring Create availability, content and SSL monitors, set up email alerts and check response times, inciden...
- Site Quality Monitoring: analyse your website's availability, performance and SEO How to add your website to cPanel's Site Quality Monitoring, what each section checks (availability,...
Something wrong or out of date? Tell us and we will review it.