How to Hide WordPress Update Notifications

If you are building a WordPress site with a premium theme and are not receiving updates, you might need to hide update notifications for WordPress. Or, if you are building a WordPress website for a client and do not want them to perform updates randomly that could potentially break customizations, you can also use this method.

However, hiding these WordPress update notifications is generally not recommended because if you go a long time without updating WordPress, whether it is the WordPress Core, themes, or plugins, it can lead to security vulnerabilities on your website.

But if you only want to hide a specific update feature, such as hiding only the WordPress plugin update feature, you can still follow the steps on this page.

How to Hide WordPress Update Notifications

Since you can update three components in WordPress (themes, plugins, and core), this guide will cover how to disable notifications for one of those updates or how to disable all update notifications.

Copy the Script to Disable Update Notifications

The first step you need to take is to copy the additional script used to disable the update notification feature.

To disable the WordPress core update notification feature, you can use this code

// Menyembunyikan notifikasi update WordPress - wpgan.comfunction wpgan_hide_core_update(){global $wp_version;return(object) array('last_checked'=> time(),'version_checked'=> $wp_version,);}add_filter('pre_site_transient_update_core','wpgan_hide_core_update'); //Menyembuyikan notifikasi update WordPress Core - wpgan.com

To disable the theme update notification feature, you can use the following code

// Menyembunyikan notifikasi update theme WordPress - wpgan.comfunction wpgan_hide_theme_update(){global $wp_version;return(object) array('last_checked'=> time(),'version_checked'=> $wp_version,);}add_filter('pre_site_transient_update_themes','wpgan_hide_theme_update'); //Menyembuyikan notifikasi update theme WordPress - wpgan.com

To hide plugin update notifications, you can use this code

// Menyembunyikan notifikasi update plugin WordPress - wpgan.comfunction wpgan_hide_plugin_update(){global $wp_version;return(object) array('last_checked'=> time(),'version_checked'=> $wp_version,);}add_filter('pre_site_transient_update_plugins','wpgan_hide_plugin_update'); //Menyembuyikan notifikasi update plugin WordPress - wpgan.com

If you want to hide all update notifications, you can use this code

// Menyembunyikan semua notifikasi update WordPress - wpgan.comfunction wpgan_hide_all_update(){global $wp_version;return(object) array('last_checked'=> time(),'version_checked'=> $wp_version,);}add_filter('pre_site_transient_update_core','wpgan_hide_all_update'); //Menyembuyikan notifikasi update WordPress Core - wpgan.comadd_filter('pre_site_transient_update_themes','wpgan_hide_all_update'); //Menyembuyikan notifikasi update theme WordPress - wpgan.comadd_filter('pre_site_transient_update_plugins','wpgan_hide_all_update'); //Menyembuyikan notifikasi update plugin WordPress - wpgan.com

Now that you have the code to hide update notifications, you can add it to your theme file.

Adding Code to WordPress Configuration

There are several ways to add this code, including via FTP, File Manager, Theme Editor, using a plugin, and so on. However, we will only discuss using the theme editor here.

To add code using the theme editor, first open your WordPress dashboard, which by default can be accessed via the https://namaweb.site/wp-admin/

Cara Menyembunyikan Notifikasi Update WordPress - 1

Once you are on the WordPress dashboard page, open the menu Appearance > Theme File Editor located in the left panel of the WordPress dashboard.

Cara Menyembunyikan Notifikasi Update WordPress - 2

If a notification appears, you can click the button I Understand to continue the process of editing files in your theme. Once done, you can look for the file function (functions.php) to add the code.

Cara Menyembunyikan Notifikasi Update WordPress - 3

Add the code to hide update notifications that you copied at the beginning of this article, then paste it on the very last line of the functions.php file and click the button Update File to save your changes.

Cara Menyembunyikan Notifikasi Update WordPress - 4

After the file is saved, try refreshing your page, and now the update notification will no longer be displayed on your WordPress dashboard.

Cara Menyembunyikan Notifikasi Update WordPress - 5

Written by

Muhammad Khoirun Nasikin

I enjoy tinkering with WordPress, hosting, VPS, web development, and various small experiments related to websites. I have over 3 years of experience in the web hosting industry.

COMMENTS

Loading...