How to reduce consumption wp-admin/admin-ajax.php

How to reduce consumption wp-admin/admin-ajax.php

Sometimes our WordPress installation may make excessive use of admin-ajax.php, consuming a large amount of the server’s available resources and overloading it.
 
This file comes by default with our WordPress installation as it is part of the core, and its function is to allow communication through AJAX requests thanks to the WordPress Heartbeat API. For example, it enables communication between certain plugins, themes, autosaving of posts and pages, etc.
 
In general, this should not affect the performance of our installation. However, when additional plugins and themes are installed, combined with website traffic, it may generate requests at very short intervals.
 
 
Our recommendation is to limit these connections so they are not so frequent and to leave a time gap between them. To do this, we can install the Heartbeat Control plugin.
 
To do so, go to Plugins and Add New:
 
 
Next, in the search bar, look for the Heartbeat Control plugin as shown below:
 
 
Once the plugin is installed, go to Settings > Heartbeat Control:
 
 
Then configure it to limit the Heartbeat across the entire website except on post editing pages, and set the interval to 60 seconds, as shown in the image below:
 
 

For more information, you can  contact us .
    • Related Articles

    • How to reduce wp-cron.php consumption

      WordPress has scheduled tasks such as checking for WordPress, plugin, or theme updates, creating backups, performing pingbacks, etc. These tasks are usually triggered when someone visits the website, for example. This is why it does not pose a ...
    • How to reduce consumption and protect wp-login.php

      In some cases, attackers may attempt to flood your wp-login.php file with repeated requests in order to guess your username and password. These brute-force attempts can not only compromise your credentials but also overload your server resources. To ...
    • What to do in case of overconsumption in our accommodation

      When the applications you have hosted generate high server resource consumption, it can affect the rest of the websites hosted on the same machine. For this reason, when cdmon technicians detect this consumption, they inform you via email. This ...
    • WooCommerce: Slow charge for 'wc-ajax=get_refreshed_fragments'

      WooCommerce is the most popular plugin for creating online stores in WordPress. This plugin uses AJAX technology to provide a smooth and dynamic user experience. One of the key AJAX calls is wc-ajax=get_refreshed_fragments, designed to update ...
    • How to change the WordPress administrator password from wp-admin

      In this guide, we will show how to change your WordPress user password from /wp-admin, that is, from your WordPress admin panel. Your administration folder does not necessarily have to be called /wp-admin, but by default this is the name of the ...