Wordpress admin-ajax.php CPU Use

The introduction of the Wordpress Heartbeat API has some advantages, and of couse disadvantages. The Heartbeat API is responsible for revision tracking, aut-save, and better session management. The downside is that it can quite easily cause high cpu load on sites where you may have multiple users logged in, especially to the dashboard area. Simply leaving a page open in dashboard can cause the  Heartbeat API to continually spawn PHP processes which uses CPU.


Options For Reducing Wordpress Heartbeat CPU Use


You can disable it completely by adding the following to your themes function.php file by adding this after the "<?php" tag:

 

add_action( 'init', 'stop_heartbeat', 1 );
function stop_heartbeat() {
wp_deregister_script('heartbeat');
}


On larger sites where there are usually multiple people working in the admin dashboard this may not be a good option. You can instead reduce the Heartbeat frequency by using the Heartbeat Control plugin.

This plugin will also allow you to disable Heartbeat, but from what I have seen it is not always completely reliable for disabling.






  • wordpress cpu, admin-ajax, high cpu use
  • 0 用戶發現這個有用
這篇文章有幫助嗎?

相關文章

Improve Wordpress Performance With Litespeed LsCache

Litespeeds LScache for Wordpress outperforms every other Wordpress cache we have tested. Not only...

Running Out Of Disk Space What can I Do?

If you are running out of disk space and you are using Wordpress you can either add additional...

Migrating Wordpress Like A Pro With SSH

  Migrating your Wordpress site with SSH can streamline things, avoid some potential issues, and...

Installing VersionPress Plugin

VersionPress is an excellent way to version, sync, and stage Wordpress sites. VersionPress uses...

Changing Wordpress URL After Domain Change

When you move your Wordpress site over to a new domain usually changing the URL in the admin...