{"id":4380,"date":"2026-09-12T16:51:43","date_gmt":"2026-09-12T11:21:43","guid":{"rendered":"https:\/\/cpanelfree.com\/blog\/how-to-disable-wordpress-bloat-heartbeat-revisions-xmlrpc\/"},"modified":"2026-09-12T16:52:33","modified_gmt":"2026-09-12T11:22:33","slug":"how-to-disable-wordpress-bloat-heartbeat-revisions-xmlrpc","status":"publish","type":"post","link":"https:\/\/cpanelfree.com\/blog\/how-to-disable-wordpress-bloat-heartbeat-revisions-xmlrpc\/","title":{"rendered":"How to Disable Bloated WordPress Core Features: Heartbeat, Revisions &amp; XML-RPC"},"content":{"rendered":"<p>WordPress is designed to accommodate every conceivable use case out of the box\u2014from beginner blogs to massive media publications. To support this broad audience, WordPress core enables several background background services by default: continuous autosaving, post revision tracking, real-time AJAX polling, and legacy XML-RPC endpoints. While well-intentioned, these background mechanisms introduce severe CPU churn, database bloating, and critical security vulnerabilities when deployed on a production <a href=\"https:\/\/cpanelfree.com\/\">Linux VPS<\/a>.<\/p>\n<p>If you have ever noticed unexplained CPU spikes in <code>top<\/code> or <code>htop<\/code> when editors are writing articles, observed your MariaDB database ballooning past gigabytes of revision history, or faced automated botnets flooding <code>xmlrpc.php<\/code> with brute-force attacks, your server is suffering from WordPress core bloat. This tutorial demonstrates how to cleanly disable or constrain these bloated features using native PHP hooks and Nginx server directives.<\/p>\n<h2>1. Restraining the WordPress Heartbeat API<\/h2>\n<p>The <strong>Heartbeat API<\/strong> (<code>wp-admin\/admin-ajax.php<\/code>) uses periodic AJAX requests to communicate between the visitor&#8217;s browser and the server. It handles autosaving posts, session expiration notifications, and post locking when multiple authors edit the same document.<\/p>\n<p>By default, Heartbeat sends an AJAX POST request every <strong>15 seconds<\/strong> while an editor is in the Gutenberg post editor and every <strong>60 seconds<\/strong> in the administrative dashboard. If you have an editorial team with 5 authors keeping dashboard tabs open, your server processes hundreds of dynamic PHP-FPM requests every minute, consuming CPU cycles for idle screens.<\/p>\n<p>To safely slow down Heartbeat to 60-second intervals or disable it completely on the frontend, add this lightweight snippet to a custom mu-plugin (<code>\/wp-content\/mu-plugins\/disable-bloat.php<\/code>):<\/p>\n<pre><code>&lt;?php\n\/\/ Slow down Heartbeat API to 60-second intervals in admin\nadd_filter('heartbeat_settings', function ($settings) {\n    $settings['interval'] = 60; \/\/ Set interval to 60 seconds\n    return $settings;\n});\n\n\/\/ Completely disable Heartbeat on the public frontend\nadd_action('init', function () {\n    if (!is_admin()) {\n        wp_deregister_script('heartbeat');\n    }\n}, 1);<\/code><\/pre>\n<h2>2. Capping Post Revisions &amp; Autosave Intervals<\/h2>\n<p>Every time an author clicks &#8220;Save Draft&#8221; or triggers an autosave, WordPress inserts a complete copy of the post into the <code>wp_posts<\/code> table. Over a year of content creation, a single 1,000-word blog post can easily spawn 80 historical revisions. On a site with 1,000 articles, <code>wp_posts<\/code> ends up storing 80,000 dead rows, drastically inflating database index sizes and slowing down SQL queries.<\/p>\n<p>Constrain revisions and expand autosave intervals inside <code>wp-config.php<\/code>:<\/p>\n<pre><code>\/* Cap post revisions to the last 3 edits *\/\ndefine('WP_POST_REVISIONS', 3);\n\n\/* Increase autosave frequency to 300 seconds (5 minutes) *\/\ndefine('AUTOSAVE_INTERVAL', 300);\n\n\/* Automatically empty trash after 7 days *\/\ndefine('EMPTY_TRASH_DAYS', 7);<\/code><\/pre>\n<p>To purge historical orphaned revisions from an existing bloated database, run this single SQL command via WP-CLI:<\/p>\n<pre><code>wp db query \"DELETE FROM wp_posts WHERE post_type = 'revision';\" --allow-root\nwp db query \"OPTIMIZE TABLE wp_posts;\" --allow-root<\/code><\/pre>\n<h2>3. Completely Disabling XML-RPC (xmlrpc.php)<\/h2>\n<p>The XML-RPC specification was introduced in WordPress 3.5 to allow remote publishing via legacy mobile apps. Today, the modern WordPress REST API handles all authenticated external interactions, rendering XML-RPC obsolete for 99% of web applications.<\/p>\n<p>However, <code>xmlrpc.php<\/code> remains the single most targeted attack vector on WordPress servers. Automated botnets exploit the <code>system.multicall<\/code> method to guess hundreds of password combinations in a single HTTP request, completely bypassing basic login rate limiters and exhausting server CPU.<\/p>\n<h3>Block XML-RPC at the Nginx Web Server Level<\/h3>\n<p>The most efficient way to eliminate XML-RPC abuse is to block it before it ever invokes PHP-FPM. Add this rule to your Nginx virtual host configuration:<\/p>\n<pre><code># Block all access to xmlrpc.php\nlocation = \/xmlrpc.php {\n    deny all;\n    access_log off;\n    log_not_found off;\n    return 403;\n}<\/code><\/pre>\n<h3>Disable XML-RPC via WordPress PHP Filter<\/h3>\n<p>As a secondary defense, disable XML-RPC handling inside your mu-plugin:<\/p>\n<pre><code>\/\/ Disable XML-RPC methods in WordPress core\nadd_filter('xmlrpc_enabled', '__return_false');\nremove_action('wp_head', 'rsd_link');\nremove_action('wp_head', 'wlwmanifest_link');<\/code><\/pre>\n<h2>4. Disabling Self-Pingbacks and Trackbacks<\/h2>\n<p>Whenever you link to an internal post on your own website, WordPress sends an unnecessary HTTP pingback request to itself, generating wasteful server round-trips. Disable self-pingbacks with this snippet:<\/p>\n<pre><code>add_action('pre_ping', function (&amp;$links) {\n    $home = get_option('home');\n    foreach ($links as $l =&gt; $link) {\n        if (str_contains($link, $home)) {\n            unset($links[$l]);\n        }\n    }\n});<\/code><\/pre>\n<div style=\"background: #0f172a;border-left: 4px solid #10b981;padding: 20px;border-radius: 8px;margin: 24px 0\">\n<h4 style=\"color: #10b981;margin-top: 0\">Measurable Server Performance Gains<\/h4>\n<p style=\"color: #cbd5e1;margin-bottom: 0\">Implementing these four core optimizations slashes baseline PHP-FPM requests by over 40%, shrinks database backups by up to 60%, and completely shields your server from XML-RPC distributed brute-force floods. Your VPS CPU stays cool, leaving full compute power dedicated to genuine visitor traffic.<\/p>\n<\/div>\n<h2>WordPress Database Optimization: Purging Transients &amp; Autoloaded Options<\/h2>\n<p>Beyond disabling the Heartbeat API, revisions, and XML-RPC, another silent performance killer is <strong>autoloaded data bloat<\/strong> in the <code>wp_options<\/code> table:<\/p>\n<ul>\n<li><strong>Understanding Autoloaded Options:<\/strong> Every single time WordPress boots, it executes a single database query: <code>SELECT option_name, option_value FROM wp_options WHERE autoload = 'yes'<\/code>. If this query returns more than 1MB of serialized data, page load times slow down by 200\u2013500 milliseconds across the entire site.<\/li>\n<li><strong>Identifying Massive Autoloaded Keys:<\/strong> Audit your autoloaded option size directly using WP-CLI:\n<pre><code>wp db query \"SELECT option_name, length(option_value) AS option_size FROM wp_options WHERE autoload='yes' ORDER BY option_size DESC LIMIT 10;\" --allow-root<\/code><\/pre>\n<p>    Look for abandoned plugin settings, stale analytics logs, and cache dumps left behind by deleted plugins.<\/li>\n<li><strong>Switching Autoload Flags on Inactive Plugins:<\/strong> For large options that are only required in the administrative dashboard, update their autoload setting to <code>no<\/code>:\n<pre><code>wp db query \"UPDATE wp_options SET autoload = 'no' WHERE option_name = 'huge_abandoned_plugin_data';\" --allow-root<\/code><\/pre>\n<\/li>\n<li><strong>Benchmarking Query Time Improvements:<\/strong> After optimizing autoloaded options and disabling core bloat, test page execution time with <code>curl -o \/dev\/null -s -w 'Total Time: %{time_total}s<br \/>\n' https:\/\/yourdomain.com\/<\/code>. Time-to-first-byte (TTFB) routinely drops from 600ms down to sub-80ms.<\/li>\n<\/ul>\n<div style=\"background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);border: 1px solid #334155;border-radius: 12px;padding: 28px;margin: 36px 0;text-align: center\">\n<h3 style=\"color: #38bdf8;margin-top: 0;font-size: 22px\">Host Lightweight, Hardened WordPress on CpanelFree<\/h3>\n<p style=\"color: #cbd5e1;font-size: 16px;line-height: 1.6;max-width: 680px;margin: 12px auto 24px auto\">Say goodbye to bloated shared hosting with aggressive resource throttles. Enjoy unmetered bandwidth, dedicated NVMe SSD storage, and enterprise uptime with CpanelFree hosting.<\/p>\n<p>    <a href=\"https:\/\/cpanelfree.com\/\" style=\"background: #38bdf8;color: #0f172a;font-weight: 700;padding: 12px 28px;border-radius: 6px;text-decoration: none;display: inline-block;font-size: 15px\">Discover CpanelFree Fast Web Hosting &rarr;<\/a>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>WordPress is designed to accommodate every conceivable use case out of the box\u2014from beginner blogs to massive media publications. To support this broad audience, WordPress core enables several background background services by default: continuous autosaving, post revision tracking, real-time AJAX polling, and legacy XML-RPC endpoints. While well-intentioned, these background mechanisms introduce severe CPU churn, database &#8230; <a title=\"How to Disable Bloated WordPress Core Features: Heartbeat, Revisions &amp; XML-RPC\" class=\"read-more\" href=\"https:\/\/cpanelfree.com\/blog\/how-to-disable-wordpress-bloat-heartbeat-revisions-xmlrpc\/\" aria-label=\"Read more about How to Disable Bloated WordPress Core Features: Heartbeat, Revisions &amp; XML-RPC\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":4379,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-4380","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-web-hosting-news"],"_links":{"self":[{"href":"https:\/\/cpanelfree.com\/blog\/wp-json\/wp\/v2\/posts\/4380","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/cpanelfree.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/cpanelfree.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/cpanelfree.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/cpanelfree.com\/blog\/wp-json\/wp\/v2\/comments?post=4380"}],"version-history":[{"count":1,"href":"https:\/\/cpanelfree.com\/blog\/wp-json\/wp\/v2\/posts\/4380\/revisions"}],"predecessor-version":[{"id":4390,"href":"https:\/\/cpanelfree.com\/blog\/wp-json\/wp\/v2\/posts\/4380\/revisions\/4390"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/cpanelfree.com\/blog\/wp-json\/wp\/v2\/media\/4379"}],"wp:attachment":[{"href":"https:\/\/cpanelfree.com\/blog\/wp-json\/wp\/v2\/media?parent=4380"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cpanelfree.com\/blog\/wp-json\/wp\/v2\/categories?post=4380"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cpanelfree.com\/blog\/wp-json\/wp\/v2\/tags?post=4380"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}