Speed up WordPress admin with functions.php tweaks

A sluggish WordPress admin panel costs real time every day for developers, editors, and site owners who log in regularly. The default installation loads several features and background processes that feel useful in a fresh setup but quietly consume resources on every admin page load once your site is running. The Heartbeat API polls the server every 15 seconds by default, checking for post lock conflicts, autosave triggers, and plugin update notifications — generating a constant stream of admin-ajax.php requests even when the admin tab is idle in the background. Dashboard widgets like the WordPress Events feed, the Quick Draft panel, and the Activity widget make additional HTTP requests and database queries that serve no practical purpose for experienced teams that have their own editorial workflows. Emoji detection scripts load on both the front end and the admin even on sites that never use emoji in content, adding unnecessary JavaScript evaluation time to every page. None of these features are load-bearing for core admin functionality — removing them makes the interface noticeably snappier without losing anything you actually use. WordPress provides clean hooks to disable all three categories without editing core files. The wp_dashboard_setup action lets you unregister individual dashboard widgets by their meta box IDs. The init action fires early enough to detach the emoji script print functions before they queue onto the page. The heartbeat_settings filter exposes the polling interval as a configurable integer — setting it to 60 seconds reduces admin-ajax.php calls by 75% compared to the default. All three tweaks can coexist in a single cohesive snippet. For an additional admin performance improvement, consider also disabling the block editor for custom post types that only need simple text input — loading the full Gutenberg asset bundle on CPT list and edit screens adds significant overhead that benefits no one.

Problem: The WordPress admin feels slow due to unnecessary dashboard widgets, emoji scripts, and frequent Heartbeat API calls.

Solution: Add the following code to your functions.php file:

<?php
// Remove unused dashboard widgets
add_action( 'wp_dashboard_setup', 'ha_remove_dashboard_widgets' );

function ha_remove_dashboard_widgets() {
    remove_meta_box( 'dashboard_primary',       'dashboard', 'side'   );
    remove_meta_box( 'dashboard_quick_press',   'dashboard', 'side'   );
    remove_meta_box( 'dashboard_recent_drafts', 'dashboard', 'normal' );
    remove_meta_box( 'dashboard_activity',      'dashboard', 'normal' );
}

// Disable emoji detection scripts on front end and admin
add_action( 'init', 'ha_disable_wp_emojis' );

function ha_disable_wp_emojis() {
    remove_action( 'wp_head',             'print_emoji_detection_script', 7 );
    remove_action( 'admin_print_scripts', 'print_emoji_detection_script'    );
    remove_action( 'wp_print_styles',     'print_emoji_styles'               );
    remove_action( 'admin_print_styles',  'print_emoji_styles'               );
    remove_filter( 'the_content_feed',    'wp_staticize_emoji'               );
    remove_filter( 'comment_text_rss',    'wp_staticize_emoji'               );
}

// Reduce Heartbeat API polling interval from 15s to 60s
add_filter( 'heartbeat_settings', 'ha_slow_down_heartbeat' );

function ha_slow_down_heartbeat( $settings ) {
    $settings['interval'] = 60;
    return $settings;
}

NOTE: The dashboard widget IDs (dashboard_primary, etc.) are the defaults shipped with WordPress core. Third-party plugins register their own widget IDs — inspect them via $wp_meta_boxes['dashboard'] in a temporary debug snippet if you need to identify and remove additional ones. Setting the Heartbeat interval to 60 is a balanced compromise; you can set it higher or disable it entirely using wp_deregister_script( 'heartbeat' ), but doing so disables post autosave as well.