A WordPress site’s access log where admin-ajax.php accounts for 60% of requests is a site where one plugin is doing way more than it should and nobody noticed. The endpoint is the catch-all for WordPress AJAX, including Heartbeat, WooCommerce cart fragments, page-builder previews, and every third-party plugin that does not implement REST. When it dominates traffic, the question is which action parameter is driving it.
What’s happening
admin-ajax.php is WordPress’s pre-REST-API mechanism for handling AJAX requests. A request hits admin-ajax.php?action=foo, WordPress loads the full environment, fires wp_ajax_foo (for logged-in users) or wp_ajax_nopriv_foo (for everyone), and returns the response. Unlike the REST API, every admin-ajax request loads core, plugins, theme functions.php, and all of WordPress’s lifecycle hooks.
When admin-ajax becomes the hot path, four causes are common:
- Heartbeat fires constantly from many concurrent editors — a known problem on multisite or LMS installs.
- A page-builder polls for autosave — Elementor, Divi, WPBakery each make
admin-ajax.phpcalls during editing. - A poorly-coded plugin uses admin-ajax for front-end calls every page — particularly true for analytics, AB testing, and personalization plugins from before the REST API was the default.
- WooCommerce cart fragments — every add-to-cart or page load refreshes the mini-cart via admin-ajax, even when nothing changed.
How to verify
Identify the top action parameters hitting admin-ajax:
awk '/admin-ajax/ {for(i=1;i<=NF;i++) if($i ~ /action=/) print $i}' \
/var/log/nginx/access.log \
| sort | uniq -c | sort -rn | head -20
You will get a list like:
4231 action=heartbeat
1847 action=wc-ajax
923 action=elementor_ajax
612 action=jetpack_ad_view
444 action=woocommerce_add_to_cart
That tells you what to fix. Cross-reference with timestamps to see if the volume spikes at certain hours.
Confirm the per-request cost via APM:
# In New Relic: APM → Transactions → /wp-admin/admin-ajax.php
# Break down by action parameter — most APMs do this automatically
A healthy admin-ajax average response time is under 300 ms. Anything above 500 ms is a problem; above 1.5 s is critical.
The fix
- For Heartbeat-dominated admin-ajax: tune Heartbeat (see the dedicated article). Slow the interval, disable on the front-end, drop it outside the post editor.
- For WooCommerce cart-fragments-dominated admin-ajax: cart fragments refresh the mini-cart count on every page load. If your theme has no mini-cart in the header, disable the script:
add_action('wp_enqueue_scripts', function() {
if (function_exists('is_woocommerce') && !is_woocommerce()) {
wp_dequeue_script('wc-cart-fragments');
}
}, 11);
- For page-builder admin-ajax dominance: the builder is making autosave or preview calls. Educate the team to close the editor when not actively editing. For Elementor specifically, the
elementor_ajaxaction is autosave — slow its interval from 60s to 180s in Elementor settings. - For third-party plugin admin-ajax abuse: identify the plugin via the action name. Contact the plugin maintainer or replace the plugin. A common offender uses admin-ajax for what should be a REST endpoint — the REST API loads less of WordPress per request and is cheaper.
- Move long-running admin-ajax to a dedicated PHP-FPM pool: if you cannot eliminate the load, isolate it. Nginx can route specific
action=parameters to a pool with its own worker limits, so a slow admin-ajax cannot starve regular page rendering. - Add caching where appropriate: some admin-ajax responses are cacheable for short windows. A
noprivadmin-ajax that returns the same JSON for all anonymous visitors can use a 60-second transient.
Re-measure access log distribution after the fix. The expected outcome is admin-ajax dropping to under 20% of total requests on a content site, under 35% on a transaction-heavy site.
Stack Harbor profiles admin-ajax distribution as part of enterprise WordPress support onboarding and continuous monitoring. If admin-ajax is dominating your PHP-FPM pool and you cannot identify the action, book a 30-minute review.