Last updated December 5th, 2023 23:55
I have written about the functionality of automatic updates in the WordPress content management system several times. Part of this feature includes sending an informational email to the website administrator. In the email, the system administrator receives information about the automatic updates that have taken place on the website. The purpose of the email is simple: to inform you, as the website administrator, that an action has occurred on the website. It is then your responsibility to check if everything is functioning correctly on the website. However, if these notifications are bothering you, you can deactivate them. In this article, we will demonstrate PHP code and explain how to disable automatic emails about WordPress updates.
We will accomplish this using a snippet because unfortunately, WordPress does not have a native settings section where users can modify this behavior.
How to Disable Automatic Emails about WordPress Updates
Disabling automatic emails is a straightforward process accomplished with a short code snippet. To insert short PHP code snippets, also known as snippets, into your website, you will need a plugin. There are several available in the official repository. Personally, I recommend using the WPCode plugin. It is also available at this address: https://wordpress.org/plugins/insert-headers-and-footers/
With this plugin, you can easily add code to your system that will execute and perform actions and functions defined by you. For a detailed guide, if you have never worked with such a plugin before, you can find it here: How to Insert Custom Code in WordPress.
If you have read the article, you probably have an idea of how to add such a snippet to your website. The code to disable automatic update emails looks like this:
// Disable auto-update emails.
add_filter( 'auto_core_update_send_email', '__return_false' );
// Disable auto-update emails for plugins.
add_filter( 'auto_plugin_update_send_email', '__return_false' );
// Disable auto-update emails for themes.
add_filter( 'auto_theme_update_send_email', '__return_false' );
As you can see, the snippet consists of three short sections. In the first section disables emails about WordPress updates. The second part focuses on plugins, and the last one pertains to theme templates. It is logical that you can take either the entire snippet or individual parts as needed.
Conclusion
Once you insert and activate the snippet using the WPCode plugin, the automatic update functionality remains unaffected. The only change is that WordPress will no longer send you informative notifications about such actions. Personally, I can think of one situation where this feature is useful: when you are managing a website on behalf of someone else. If you don’t want to bother the website owner with emails that they may not understand as an administrator, you have the option to disable this functionality using the snippet.
The website is created with care for the included information. I strive to provide high-quality and useful content that helps or inspires others. If you are satisfied with my work and would like to support me, you can do so through simple options.
Byl pro Vás tento článek užitečný?
Klikni na počet hvězd pro hlasování.
Průměrné hodnocení. 0 / 5. Počet hlasování: 0
Zatím nehodnoceno! Buďte první
Je mi líto, že pro Vás nebyl článek užitečný.
Jak mohu vylepšit článek?
Řekněte mi, jak jej mohu zlepšit.
Subscribe to the Newsletter
Stay informed! Join our newsletter subscription and be the first to receive the latest information directly to your email inbox. Follow updates, exclusive events, and inspiring content, all delivered straight to your email.