Skip to content

Early-bird lifetime licence: $199 once, for the first 200 buyers only. See the offer

Slow down the Heartbeat API

While the admin is open, WordPress checks in with the server every 15 to 60 seconds. Once a minute is enough for post locks and login checks, and saves server work.

  • Type PHP
  • Runs Everywhere (runs as WordPress loads)
  • Tested with WordPress 7.1
PHP
<?php

add_filter(
	'heartbeat_settings',
	static function ( $settings ) {
		$settings['interval'] = 60; // Seconds, between 15 and 120.
		return $settings;
	}
);

In these packs

  • Performance: Small changes that save the server and the browser some work.

Move your snippets over this afternoon.

Importing changes nothing until you switch over, and your old shortcodes keep working.