Diagnosing a suddenly slow WordPress site
How to find and fix the cause of sudden WordPress performance problems by profiling slow queries, auditing plugins, optimising the database, configuring caching and checking hosting resources.
Diagnosing a suddenly slow WordPress site
A WordPress site that was loading quickly yesterday but is sluggish today usually has a specific, identifiable cause. Something changed, whether it's a plugin update, a new piece of code, a traffic spike, a database that's grown too large or a server-level issue on your hosting provider's end.
This is different from a site that has always been slow, which is typically a broader optimisation problem. When performance drops suddenly, the goal is to find what changed rather than applying general performance tweaks blindly.
Rule out server and hosting issues
Before investigating your WordPress installation, check whether the problem is on your hosting provider's end. Look at their status page for any reported outages, maintenance windows or infrastructure issues.
Test your site's response time from multiple geographic locations using an online performance testing tool. What you're looking for is the Time To First Byte (TTFB), which measures how long it takes the server to start sending a response. If TTFB is consistently high regardless of which page you test, the bottleneck is likely server-side rather than in your WordPress code or content.
Also test in an incognito or private browsing window with your browser cache cleared. If the site loads quickly in a clean browser session, the slowness may be related to stale cached assets or browser extensions rather than your server.
If TTFB is high, contact your hosting provider and ask whether anything has changed on the server recently, such as increased load from other accounts on a shared server, a PHP or MySQL configuration change or resource throttling.
Profile your site's performance
The most efficient way to identify what's causing the slowdown is to profile your site, which means measuring how long each component takes to execute.
WordPress has a built-in debug mode that can help. Add the following to wp-config.php:
define('WP_DEBUG', true);
define('WP_DEBUG_LOG', true);
define('WP_DEBUG_DISPLAY', false);
This logs PHP errors and warnings to wp-content/debug.log, which can reveal plugins or theme functions that are generating errors or running inefficiently.
For more detailed profiling, look for a developer-oriented performance profiling plugin that can show you exactly which database queries are running on each page, how long each one takes, which plugins are responsible for the most overhead and how much memory each component uses. This kind of tool is invaluable for narrowing down the cause quickly rather than guessing.
Disable debug mode and remove any profiling tools when you're finished, as they add overhead themselves and debug logs can expose sensitive information.
Audit your plugins and theme
Plugins are the most common source of sudden performance drops, particularly after updates. An update might introduce a new feature that runs additional database queries, or a bug that causes a process to run much longer than it should.
Start by updating all plugins and themes to their latest versions, as performance regressions are often fixed in subsequent releases. Then review your active plugins and deactivate anything you're not actively using. Every active plugin adds overhead, even if only slightly, and the cumulative effect can be significant.
Check for plugins with overlapping functionality. Running multiple caching plugins, multiple SEO plugins or multiple security plugins simultaneously can cause conflicts and significant slowdowns as they duplicate work.
To test whether your theme is the cause, temporarily switch to a default WordPress theme (such as Twenty Twenty-Four). Themes with large feature sets, built-in page builders, sliders and complex layout systems can add substantial processing time to every page load. If your site is noticeably faster with a default theme, the performance issue is in your theme rather than in WordPress or your plugins.
Upgrade your PHP version
The version of PHP your server is running has a significant impact on WordPress performance. PHP 8.x is substantially faster than PHP 7.x, which in turn was much faster than earlier versions. If your hosting environment is still running an older PHP version, upgrading can provide an immediate and noticeable speed improvement.
Check your current PHP version under Tools → Site Health in the WordPress dashboard, or in your hosting control panel. Most hosting providers allow you to change the PHP version from their control panel.
Before upgrading, check that your plugins and theme are compatible with the newer PHP version. Most actively maintained plugins support PHP 8.x, but older or abandoned plugins may not. Test on a staging environment if possible, or be prepared to deactivate any plugins that cause errors after the upgrade.
Implement caching
If your site doesn't have caching configured, every page request requires WordPress to execute PHP code, run database queries and build the page from scratch. Caching stores the results of this work so that subsequent requests can be served without repeating it.
Page caching stores fully rendered HTML pages so they can be served directly to visitors without running PHP or querying the database at all. This is the most impactful type of caching for most WordPress sites. Many hosting providers include page caching as part of their managed WordPress plans, or you can configure it with a caching plugin.
Object caching stores the results of database queries in memory (using a system like Redis or Memcached) so they don't need to be run again on subsequent requests. This is particularly beneficial for sites with complex queries, logged-in users or dynamic content that can't be fully page-cached. Many managed WordPress hosts provide object caching as a built-in feature.
A content delivery network (CDN) serves your static assets (images, CSS, JavaScript files) from servers distributed around the world, reducing the distance between your visitors and your content. This improves load times for visitors who are geographically far from your hosting server.
Optimise the database
WordPress databases grow over time as post revisions, spam comments, expired transients, orphaned metadata and deleted content accumulate. A bloated database slows down queries, and if key tables like wp_options or wp_postmeta become very large, the impact can be significant.
You can limit the number of post revisions WordPress stores by adding the following to wp-config.php:
define('WP_POST_REVISIONS', 5);
This keeps the five most recent revisions for each post and prevents the revision history from growing indefinitely. You can set this to any number, or use false to disable revisions entirely (though keeping a small number is generally a better approach).
For cleaning up existing bloat, look for a database optimisation tool that can remove old revisions, clear expired transients, delete spam and trashed comments and optimise database tables. Review what the tool will delete before running it, and always work from a recent backup.
If your wp_options table has grown very large (which you can check in phpMyAdmin), it may contain autoloaded data from plugins that are no longer active. Identifying and cleaning up these orphaned entries can noticeably improve performance.
Optimise images
Large, uncompressed images are one of the most common causes of slow page loads. A single unoptimised photograph can be several megabytes, and a page with multiple large images can take significantly longer to load, especially on slower connections.
There are three aspects to image optimisation. First, compress your images to reduce file size without noticeable quality loss. Look for an image optimisation tool or plugin that can compress your existing media library and automatically compress new uploads. Second, serve images in modern formats like WebP, which provide better compression than JPEG or PNG at comparable quality. Third, make sure you're serving appropriately sized images rather than uploading large originals and relying on CSS to scale them down in the browser.
Lazy loading, which defers the loading of images that aren't visible on screen until the visitor scrolls to them, can also improve initial page load times. WordPress includes native lazy loading for images by default since version 5.5.
Check for stuck or excessive cron tasks
WordPress uses a built-in task scheduler (WP-Cron) to run background tasks like publishing scheduled posts, checking for updates and running plugin maintenance routines. If a cron task gets stuck, runs for too long or fires too frequently, it can consume server resources and slow down your site.
You can inspect the WordPress cron schedule using WP-CLI:
wp cron event list
This shows all scheduled tasks, when they're due to run and how frequently they recur. Look for tasks that are overdue (which may indicate they're failing or getting stuck) or tasks that run very frequently. If you identify a specific plugin's cron task as the problem, check the plugin's settings for options to reduce the frequency, or consider whether you still need that plugin.
Check third-party scripts and services
External scripts loaded on your pages, such as chat widgets, analytics services, social media embeds, advertising networks and tracking pixels, each add network requests that can delay page rendering. If a third-party service is slow to respond or temporarily down, it can hold up your entire page load.
Temporarily disable external scripts and measure the difference. If a specific service is causing a significant slowdown, look into loading it asynchronously (so it doesn't block the rest of the page from rendering) or consider whether it's essential enough to justify the performance cost.
Need help with WordPress performance?
If your site remains slow after working through these steps, or if profiling reveals a complex issue that's difficult to resolve on your own, my emergency WordPress support service includes performance profiling, optimisation and hosting configuration review.