Disable automatic WordPress updates with a simple snippet

Last updated December 5th, 2023 23:55

Automatic updates are one of the pillars of WordPress security. They were primarily designed to address the issue of users neglecting their website maintenance. The reality is that the majority of users who come into contact with the WordPress content management system create a basic website but then leave it unattended. Without an active owner, WordPress becomes a potential security risk. To mitigate this, WordPress has a security mechanism that allows it to perform updates automatically, without user intervention. However, such actions are not always desirable. If you find this behavior problematic, you can disable automatic WordPress updates with a simple snippet. It is quick and, most importantly, secure. Just keep in mind that you will need to actively take care of updates yourself.

Disable automatic WordPress updates with a simple snippet

You can disable automatic updates when you want to maintain full control over your website. There may be situations where the core, theme, or plugin updates have the potential to break the entire website. In such cases, disabling automatic updates is beneficial.

As mentioned above, it is important to remember that when using this snippet, you need to actively take care of your website. If you disable updates and let WordPress operate “on its own,” you risk encountering problems. An outdated WordPress installation poses security risks and can lead to issues. Therefore, perform updates manually and never underestimate their importance. A hacked website is far from pleasant, and losing weeks or months of hard work is even worse.

How to Insert the Snippet into your Website Content? Using the WPCode Plugin

To insert short PHP code snippets, also known as snippets, into your website content, you will need a plugin. There are several available in the official repository. Personally, I prefer the WPCode plugin, which is 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 updates looks like this:

				
					// Disable core auto-updates
add_filter( 'auto_update_core', '__return_false' );
// Disable auto-updates for plugins.
add_filter( 'auto_update_plugin', '__return_false' );
// Disable auto-updates for themes.
add_filter( 'auto_update_theme', '__return_false' );
				
			

Conclusion

Once you insert and activate this code using the WPCode plugin in your website content, you will disable automatic updates in WordPress. This means that in the future, you won’t have to worry about any part of the system being updated without your knowledge and potentially breaking your website. However, please note that you assume responsibility for these modifications. I want to emphasize again that an outdated WordPress installation poses a security risk. Therefore, make sure to update manually, promptly, and regularly!

More content about WordPress

Whole category is here

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í

Jak užitečný vidíte tento článek.

Sledujte mě na sociálních médiích.

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.

newsletter

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.

Odebírat
Upozornit na
guest
0 Komentáře/ů
Nejstarší
Nejnovější Nejvíce hlasováno
Vložené zpětné vazby.
Zobrazit všechny komentáře.

Pokud mi chcete napsat rychlou zprávu, využije, prosím, níže uvedený
kontaktní formulář. Děkuji.

Další Kontaktní údaje