keepcalculator

06 Numbers and Powers

Hide WordPress Upgrade? Stop Auto-Updates Now

Card No. 06·69749 · Updated · Standard formula, shown below

Average pace 5.00 min/km
Average speed
12.00 km/h
Result
Finish time
50 min
You entered
Distance
10 km
You entered
You enter
Finish time, Distance
You get
Average pace, Average speed
Rounding
2 dp

If you want to hide or stop WordPress upgrades, you can disable automatic updates and hide the update notice for everyone except administrators. This guide explains the exact code and settings to control WordPress core, theme, and plugin updates, plus how to hide the update nag from clients and visitors.

Why Would You Hide WordPress Upgrades?

WordPress updates are generally good—they patch security holes and add features—but there are several legitimate reasons you might want to hide or delay them:

  • Client sites: If you manage websites for clients, you don’t want them clicking “Update Now” and breaking a custom theme or a plugin that isn’t compatible with the latest version.
  • Staging environments: On a development copy of a site, you often want to test updates manually before pushing them live.
  • Custom code: If your site relies on heavily modified themes or plugins, an automatic update can overwrite your changes or cause fatal errors.
  • Bandwidth or uptime: Automatic updates run in the background and can slow down a shared server or cause a brief outage on a high-traffic site.

The key distinction is between hiding the update notice (so users don’t see it) and disabling the update process (so WordPress doesn’t attempt to update). You can do either or both, depending on your needs.

How WordPress Updates Normally Work

Since WordPress 3.7, minor security and maintenance releases install automatically by default. Major version updates (like 6.0 to 6.1) are also automatic for sites that can handle them, but you can opt out. Plugins and themes can auto-update if you enable that setting in the dashboard or if the plugin developer sets it.

The update notice you see in the admin bar and on the Dashboard is generated by the update-core.php page and the get_site_transient('update_core') data. To hide it, you need to filter that data before it’s displayed.

Disabling Automatic Updates (The Safe Way)

The simplest way to stop all automatic updates is to add a constant to your wp-config.php file:

define('AUTOMATIC_UPDATER_DISABLED', true);

This disables all automatic updates—core, themes, plugins, and translations. It does not remove the update notice; it just stops WordPress from updating itself.

If you want finer control, you can use the auto_update_core filter in a custom plugin or your theme’s functions.php:

add_filter('auto_update_core', '__return_false');
add_filter('auto_update_plugin', '__return_false');
add_filter('auto_update_theme', '__return_false');

This keeps manual updates available but prevents any background automatic updates.

Hiding the Update Notice from Everyone Except Admins

If you want to hide the “WordPress X.X is available! Please update now” nag from non-admin users (like editors or clients), add this to your theme’s functions.php or a site-specific plugin:

function hide_upgrade_nag_for_non_admins() {
    if ( ! current_user_can('update_core') ) {
        remove_action('admin_notices', 'update_nag', 3);
        remove_action('network_admin_notices', 'update_nag', 3);
        // Also hide the update count in the admin bar
        add_filter('wp_get_update_data', function($update_data) {
            return array('counts' => array('total' => 0, 'wordpress' => 0, 'themes' => 0, 'plugins' => 0));
        });
    }
}
add_action('admin_head', 'hide_upgrade_nag_for_non_admins');

This checks if the current user has the update_core capability (which only admins have by default). If not, it removes the notice and resets the update badge count to zero.

Hiding the Update Page Entirely

To prevent non-admins from even accessing the Updates screen (update-core.php), you can redirect them:

function block_update_page_for_non_admins() {
    if ( is_admin() && ! current_user_can('update_core') && isset($_GET['page']) && $_GET['page'] == 'update-core' ) {
        wp_redirect(admin_url());
        exit;
    }
}
add_action('admin_init', 'block_update_page_for_non_admins');

This is useful if you have users with editor roles who might click the “Updates” menu item and see the update screen.

What About Plugin and Theme Updates?

WordPress shows update badges for plugins and themes separately. To hide those from non-admins, use the same wp_get_update_data filter, but you need to also remove the individual plugin/theme update rows. A simpler approach is to disable plugin/theme auto-updates (as shown above) and then hide the entire “Updates” menu item from non-admins using a plugin like Admin Menu Editor, or by adding a filter:

function remove_updates_menu_for_non_admins() {
    if ( ! current_user_can('update_core') ) {
        remove_menu_page('update-core.php');
    }
}
add_action('admin_menu', 'remove_updates_menu_for_non_admins');

Note that this only hides the menu item; the update page is still accessible via direct URL if someone knows it, so also use the redirect code above.

Common Mistakes and Pitfalls

  • Editing functions.php of a parent theme: If you use a child theme, put the code in the child’s functions.php; otherwise, a theme update will overwrite your code.
  • Using define('DISALLOW_FILE_MODS', true): This is a heavier hammer—it disables all file editing, plugin installation, and updates (including manual ones). Only use it if you also want to block theme/plugin editors.
  • Forgetting about translation updates: Even if you disable core/plugin/theme updates, WordPress may still auto-update translations. To disable those, add add_filter('auto_update_translation', '__return_false');
  • Hiding the notice but not disabling updates: If you only hide the notice, WordPress will still auto-update in the background, which could break your site. Always disable updates first if that’s your goal.

Frequently Asked Questions

Will hiding the update notice stop WordPress from updating?

No. Hiding the notice only affects what users see. To stop actual updates, you must disable automatic updates with the constants or filters described above. Otherwise, WordPress will continue to update itself silently.

Is it safe to disable WordPress updates?

Not generally. WordPress updates often include security patches for known vulnerabilities. If you disable them, you must manually update regularly and ensure your site is otherwise hardened. For a client site, it’s better to disable auto-updates but still perform manual updates yourself after testing on a staging site.

How do I update manually after disabling auto-updates?

You can still update manually by going to Dashboard → Updates and clicking the update buttons. If you’ve disabled file modifications entirely, you’ll need to update via FTP or by replacing the files through your hosting file manager.

Can I hide the update notice only for specific user roles?

Yes. Replace current_user_can('update_core') with a role check like current_user_can('editor') or use a plugin like User Role Editor to conditionally show the notice. The code above hides it for everyone who cannot update core, which is usually all non-admins.

What if I use a managed WordPress host like WP Engine or Kinsta?

Managed hosts often disable automatic updates themselves and may not allow you to change them. They typically handle updates for you. In that case, the code above may not be necessary, but you can still hide the notice from clients if you want.

Will this code break when WordPress updates?

No. The filters and hooks used (admin_notices, wp_get_update_data, admin_menu) have been stable for years and are part of the public API. However, always test after a major WordPress release.

Conclusion

Hiding WordPress upgrades is a two-part task: disable the actual updating process (if you want) and hide the visual notifications. The code snippets above give you full control over who sees update prompts and whether WordPress updates itself. For most site owners, the best practice is to keep security updates enabled but hide the notice from non-admins, so you can manage updates yourself without alarming clients or users.

Related

Formula used
in t | Finish time | min | 50 | 0
in d | Distance | km | 10 | 0 | 100000
out pace | Average pace | min/km | t / d | 2
out speed | Average speed | km/h | d / (t / 60) | 2

Each line is one input (in, sel, list) or one result (out: label, unit, formula, decimals). How the calculators work

Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.

More cards in this drawer

The whole Numbers and Powers drawer →