
Website Performance
How the SaaSpocalypse Ended DXP as a Category
With AI changing the unit economics of creating for the web, find out what's next for digital platforms in the post-DXP world.
Learn how to reduce initial server response time by diagnosing network, caching, code, database and capacity bottlenecks – and fix the right layer.
If Lighthouse says your site’s main page took too long to load, that indicates a delay but not what caused it. The problem could be a slow network connection, a page that was not served from cache, inefficient code, slow database work, an external service or a server that is struggling with traffic.
Trying random fixes can waste time because each one targets a different cause. The better approach is to measure where the delay happens, fix that part of the request and then run the same test again – and that’s exactly what this guide will cover.
The “reduce initial server response time” warning means that the server took too long to begin sending the page’s main HTML document back to the browser. This document contains the basic structure of the page and points the browser to many of the other resources it needs, such as stylesheets, scripts and images.
Until the first part of the HTML arrives, the browser has very little it can do to build and display the page. That’s why a slow initial response delays the very beginning of the loading process, making later milestones such as largest contentful paint (LCP) harder to achieve quickly.
For a fuller explanation of the measurements and thresholds, see Server Response Time Benchmarks That Actually Matter.
What the “reduce initial server response time” warning cannot tell you is why the response was slow. That is why it should be treated as the starting point for investigation, not as a diagnosis.
Before trying to reduce server response time, create a baseline you can reproduce. A single Lighthouse result only shows what happened during one test under one set of conditions. It cannot tell you whether the delay is consistent, limited to certain visitors or caused by a temporary cache miss. Without a dependable starting point, you will not know whether a change fixed the problem or whether the next test simply ran under better conditions.
Here’s what to do:
You also need to separate three conditions that are often confused:
Keep in mind that a faster second test does not prove that server-side caching fixed the response. Check the cache-status headers and connection timings, then deliberately compare a page-cache miss with a later cache hit. This gives you a baseline that can reveal whether the delay is in the network, cache, application or infrastructure.
Additionally, you can use:
Here’s how to address each layer and how to confirm that the change solved the original problem.
You can reduce the time spent before the server begins building the page by sending visitors directly to the final URL and shortening the network path between them and your site. These changes will not fix slow application code, but they remove delays that happen before the application can return the HTML.
A redirect occurs when the browser requests one URL and the server tells it to request another. For example, a visitor might be redirected from HTTP to HTTPS, then from the non-www domain to www and finally to a language-specific page. Each step requires another exchange between the browser and a server. Redirecting to a different hostname can add extra work because the browser may also need to perform a new DNS lookup and establish another secure connection.
Here’s what you can do:
Serving the main HTML document from an edge cache can reduce initial server response time because the content delivery network (CDN) returns a stored copy from a nearby location instead of contacting the origin and waiting for the application to rebuild the page. The first request may still reach the origin, but later requests can be served from the cache while the response remains valid.
This works best for public pages that show the same content to many visitors. Personalized pages require stricter rules because the response may vary by user.
Check the response headers to confirm whether the HTML was a cache hit, miss or bypass rather than assuming the CDN cached it. If the document is not cached, review the response headers and CDN rules. Directives such as private or no-store, authentication, cookies and some query-string patterns can prevent caching or split responses into separate cache entries.
Cloudflare, for example, caches common static files by default but does not cache HTML pages without additional configuration. Pantheon’s Global CDN takes a different approach for WordPress and Drupal by supporting full-page caching for eligible pages served to anonymous visitors, as well as static assets.
Also, match cache lifetimes to how often content changes and use targeted invalidation instead of clearing the entire site. Where brief staleness is acceptable, stale-while-revalidate can serve the existing response while the cache refreshes it in the background.
Page caching and object caching both reduce server work, but they do so at different stages of the request and they differ from browser caching:
The goal is not to choose one cache. Use page caching wherever complete responses can safely be shared, then use object caching to reduce the remaining database and application work on dynamic requests.
The number of plugins, modules or packages alone doesn’t matter. What matters is what their code does during each request. One inefficient component may repeat database queries, perform expensive calculations or wait for an external API, while many lightweight components may add little measurable delay.
Profile the slow request instead of disabling software at random. An APM tool such as Pantheon’s built-in New Relic integration helps WordPress and Drupal teams trace response time across application execution, database activity and external services. Also, Query Monitor on WordPress can expose database queries, hooks, PHP errors and server-side HTTP requests, and group them by plugin, theme or function.
Once you find the slow operation, fix it directly. Remove repeated calculations, cache results that can safely be reused and move nonessential work such as email delivery or search indexing outside the visitor’s request. Independent database or API calls should also run concurrently where possible rather than waiting for one another in sequence.
Also, separate client-side and server-side third-party code. A browser-loaded analytics script may delay rendering after the HTML arrives, but a server-side API request can delay the initial response because the application may wait for that service before returning the page.
Slow database work can increase initial server response time because the application may need to wait for queries to finish before it can return the HTML. The goal is to identify which queries are slow, repeated or retrieving more data than the page actually needs.
Look for queries that run many times, scan large tables or take significantly longer than the rest using a profiler or APM tool. An N+1 pattern is a common example in which an application loads a list of items and then runs a separate query for each item, instead of retrieving the required data more efficiently.
Indexes can help the database find matching rows faster, but they should be added only after reviewing the query and its execution plan. Adding indexes without evidence can increase storage and make writes more expensive without improving the request you are trying to fix.
Tools such as Percona Toolkit can help identify inefficient queries and review how indexes are being used before making schema changes. For WordPress sites, the Index WP MySQL For Speed plugin can add optimized database keys and help surface slow database operations.
Review data that is loaded automatically on every request. In WordPress, oversized autoloaded options can add unnecessary database work. Drupal sites may have similar issues with repeated entity loading, configuration access or complex Views queries.
Where the same data is requested repeatedly, store the result in an object cache when it is safe to reuse. However, caching should support an efficient query, not hide a structurally poor one. Large imports, exports, indexing jobs and cleanup tasks should also run separately from visitor-facing requests so they do not compete with page generation.
The runtime is the software that executes your application code, such as PHP for WordPress and Drupal or Node.js for Next.js. Because every uncached request passes through this layer, an outdated or poorly configured runtime can add processing time before the server returns the HTML.
It’s important to:
For those on Pantheon, PHP versions and OPcache are managed at the infrastructure level. OPcache is automatically cleared during code deployments, so users do not need to tune or flush it manually.
A site may respond quickly during normal traffic and then slow down when many requests arrive at once. This happens when requests reach the application, database or another dependency faster than they can be completed. The extra requests begin waiting in a queue, which increases the time before the server can return the first byte.
To tackle this:
Of course, verify the fix with a controlled load test that reflects expected traffic and includes the right mix of anonymous and logged-in users. Run it in a safe environment rather than risking the live site.
Reducing initial server response time is not a one-off fix. It requires a workflow your team can repeat whenever performance changes that involves isolating the delay, validating the cause, making the smallest effective change and confirming the result under the same test conditions.
The hosting platform plays an important role in that process because it determines how requests are cached, routed, monitored and scaled before they ever reach your application.
Pantheon gives WordPress, Drupal and Next.js teams a managed environment for maintaining excellent and consistent performance. Rather than treating caching, observability and deployment as separate systems, Pantheon brings them into one operational workflow with:
Get started with Pantheon today and give your team the infrastructure to launch, optimize and scale high-performing websites with confidence.

Website Performance
With AI changing the unit economics of creating for the web, find out what's next for digital platforms in the post-DXP world.

Artificial Intelligence
What Cloudflare, Microsoft and Pantheon leaders think about adapting the web for bots, rethinking org structures & preserving brand trust.

Artificial Intelligence
Learn how to shift from traditional SEO to AI search optimization and discover three practical ways to help LLMs recommend your brand.