Features

Faster wp-admin

Published · Last updated

A slow wp-admin on a large site usually comes from a handful of queries that scan whole tables on every admin page: counts, dropdowns, dashboard widgets and checks that made sense on a small site. Scalability Pro speeds wp-admin up in the same way it speeds up the front end, by giving those queries indexes and by caching or removing the ones that are not needed.

Start with the indexes

The indexes help front-end and admin queries alike. One of them targets a query WordPress and some themes run on admin pages to list the distinct custom field names in wp_postmeta; with the index, that query reads the index instead of the whole table. Create all the indexes from the Indexes tab with Select All.

Typical result

On a site with about 2 million postmeta rows, that custom-field query went from about 1 second to under 4 ms. It saves that time on every admin page only where something runs the query on every admin page, as the Enfold theme does; WordPress core runs it on the post edit screen. On a 1 million product test store with Scalability Pro’s recommended configuration applied, opening a product to edit went from about 1.4 seconds to about 0.2 seconds (one profiler measurement each way).

Then the admin options

Where the time goesOptionTab
Counts and dropdowns on the Posts, Products and Orders listsCache author counts, Cache user counts, Cache wp-admin WooCommerce Products Category ListWP Admin
The exact total on admin listsRemove SQL_CALC_ROWS for wp-adminQuery Speed
WooCommerce dashboard widget and marketplace suggestionsRemove Woo order summary, Disable WooCommerce Marketplace SuggestionWP Admin
Slow deletes against wp_optionsOptimise WooCommerce UpdatesMiscellaneous
The custom fields dropdown on the editorRemove custom-meta select boxMiscellaneous
Slow attribute terms on the product editorAjax attribute editingMiscellaneous
Slow outbound calls from other pluginsHTTP API rulesHTTP API
Too many autoloaded optionsOptions autoload optimiserOptions Autoload

List screens

On the Posts, Products and Orders lists the rows themselves are rarely the problem. The cost is in the counts, filters and dropdowns built around the list. Scalability Pro does not cache list rows; it targets those surrounding queries.

Removing the exact count in wp-admin changes how the list paginates, so read Remove SQL_CALC_FOUND_ROWS before enabling it. The caching options change no behaviour beyond counts that can be briefly out of date.

Typical result

On a 1 million product test store, the wp-admin Products list went from about 4.3 seconds to about 0.65 seconds with Cache wp-admin WooCommerce Products Category List on (two profiler runs each way). Without the cache, the category filter above the list reads every product’s category relationships on every load.

Note

Cache author counts works by swapping in an optimised copy of the WordPress posts list table. It only activates when that copy still matches your version of WordPress, so a WordPress update can never break the list screen through it. If the copy no longer matches, the option goes dormant until Scalability Pro is updated.

Orders screen

On stores with many orders or users, three WP Admin tab options help the order screens: Cache user counts (WordPress counts every user to fill one dropdown on the order list), Remove Woo order summary (the dashboard widget) and Disable WooCommerce Marketplace Suggestion (a count of recent orders run on wp-admin pages). If you run the Order Delivery Date plugin, its admin query fix is on the Miscellaneous tab.

Further reading

the list-screen count caches
targeted fixes for specific slow admin queries
the dashboard widgets and suggestions that slow every admin page
when the slowness is another plugin’s server
when every page is slow, admin and front end

Comments

▲
▼
1/1