Skip to content
The site is slow or unstable

The dashboard is slow

The dashboard is slow even though the site is fast. The Heartbeat API, large tables and plugins checking licences can all slow it down.

You need
WP admin
Updated

When the site is fast for visitors but the dashboard is slow, it's because wp-admin is never cached. The page cache only serves visitors who aren't logged in, so PHP builds every page in wp-admin from scratch. Plugins also do more work in the dashboard than on the rest of the site: they fetch news and licence status from their own servers, show statistics and check for updates.

On top of that, every tab with wp-admin open sends regular requests through the Heartbeat API. Typical bottlenecks are Heartbeat, large tables in the database and plugins that call external servers.

Close tabs you aren't using

The Heartbeat API keeps the lock on posts being edited, warns you when your login has expired and handles autosave in the classic editor. Every tab with wp-admin open sends a request to admin-ajax.php every 10 to 60 seconds, and each request loads WordPress and PHP on the server. Background tabs send one every two minutes, and after ten minutes without activity a tab stops completely.

The exception is the post edit screen, where Heartbeat only stops after an hour without activity. If you and your colleagues have many posts open at once, the requests add up. Close the tabs you aren't using, and see whether the dashboard gets faster.

Clean up the dashboard home screen

Go to Dashboard and open "Screen Options" at the top right. Untick the boxes from plugins that show news, statistics or ads. Many of them fetch data from external servers every time the dashboard loads.

Find the plugin that slows it down

The Query Monitor plugin shows what happens while a page in wp-admin loads.

  1. Install and activate Query Monitor under Plugins.
  2. Go to a slow page in the dashboard, and open the Query Monitor menu in the admin toolbar.
  3. The "HTTP API Calls" panel lists requests to external servers and how long they took. If a plugin calls its licence server on every page view, PHP waits for the response before the page is shown.
  4. The "Queries by Component" panel shows which plugins run the most database queries and which are slowest.

Deactivate the plugin that stands out, and measure again. Some plugins let you turn off the licence check in their settings, and otherwise a newer version may have fixed the problem.

Reduce the Heartbeat frequency

Create the file wp-content/mu-plugins/heartbeat.php with the content below. If the mu-plugins folder doesn't exist, create it. WordPress loads the files in this folder automatically, without activation.

<?php
add_filter( 'heartbeat_settings', function ( $settings ) {
    $settings['minimalInterval'] = 120;
    return $settings;
} );

Each tab then sends at most one request every two minutes. Don't go above 120 seconds. A post lock expires after 150 seconds without a Heartbeat response, and two people can then edit the same post at once.

Look for large tables

Go to Tools → Site Health. "Autoloaded options could affect performance" means the options in wp_options that load on every request add up to 800 kB or more. Plugins you have deleted may have left their options behind. This query in phpMyAdmin lists the largest ones. If your table prefix isn't wp_, change it in the query.

SELECT option_name, LENGTH(option_value) AS bytes
FROM wp_options
WHERE autoload IN ('yes', 'on', 'auto', 'auto-on')
ORDER BY bytes DESC
LIMIT 20;

If Site Health also says "You should use a persistent object cache", ask your hosting provider for Redis or Memcached. WordPress then reads data from memory instead of querying the database again on every request, which shows especially in wp-admin.

The database tool in your hosting panel also shows how large each table is. Large tables with actionscheduler_ in their name hold the queue of scheduled tasks for WooCommerce and other plugins. Always back up the database before you delete anything.

When you're stuck

If the dashboard is still slow with every plugin deactivated, the cause is in the theme, the database or the server. For that you need access to the hosting panel and an experienced developer who can go through the database and the server logs. Take a backup before anyone cleans up the tables.