Disable WordPress Auto Updates with a Snippet

Learn how to disable auto updates in WordPress using WPCodeBox. You can disable WordPress updates for code, plugins and themes.

Meet WPCodeBox: The Best Code Snippets Plugin for WordPress
faces
Join thousands of developers and agencies who are working better and faster using WPCodeBox

WordPress runs automatic updates in the background by default. While this seems convenient, these changes can break your theme, create conflicts, or crash your entire site.

Automatic updates happen without backups or testing, leaving you vulnerable to compatibility issues. Many site owners want to disable this feature but fear missing critical security patches.

In this article, I’ll share how to disable auto-updates and implement a manual update process that protects your site.

Why You Should Disable Auto Updates

WordPress auto-updates can break your site without warning. Updates sometimes conflict with your theme or plugins, causing white screens or broken functionality. This happens because developers cannot test every combination of themes, plugins, and core versions.

Auto updates mean you lose the ability to test changes before they go live. Automatic updates apply without creating backups first, violating basic site management practices. This forces you to update on someone else’s schedule instead of when it’s safe for your business.

wordpress core auto update schedule

Manual control lets you update components one at a time. This approach helps you quickly identify which change caused a problem if something breaks. You can test each update in a staging environment before touching your production site.

Is It Safe to Disable Auto Updates?

Disabling auto-updates stops critical security patches from installing automatically. You gain control but lose convenience. Your site won’t receive fixes for newly discovered vulnerabilities without manual intervention.

This trade-off requires a strict maintenance schedule. You must check for updates frequently and apply security patches immediately. Missing a single critical update leaves your site exposed to known attacks.

The benefit you get is stability. You can test every change in a staging environment before it reaches your live site. This saves you from surprise crashes from incompatible themes or plugins updating at 3 AM. 

The best way to deal with auto-updates is to go with a balanced approach. This keeps core auto-updates enabled while disabling theme and plugin updates. Core updates rarely break sites and patch critical vulnerabilities immediately. This gives you security protection without sacrificing control over third-party extensions.

How to Disable All Auto Updates (Code Snippet)

You can disable every major auto-update type with this compact snippet. It blocks core, plugin, and theme updates without touching the website file.


add_filter('automatic_updater_disabled', '__return_true')

This filter targets the entire background update system and disables it completely. It acts as a master switch that stops WordPress from automatically updating the core software, plugins, and themes without your approval.

wordpress auto update disabled

How to Disable Specific Updates Only (Advanced Configuration)

The previous snippet disables all updates, including core security patches. This creates a dangerous security gap that you should avoid. A smarter approach would be to keep core updates active while disabling plugin and theme updates.

WordPress core updates patch newly discovered threats without manual intervention. The snippet below maintains this protection while preventing plugin and theme conflicts.

//add_filter('automatic_updater_disabled', '__return_true')

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

The core filter is commented out by default, allowing automatic security patches. The plugin and theme filters prevent extensions from updating without your approval. This gives you security protection without risking compatibility issues.

Step-by-Step: Adding the Snippet to Your Website

You can add these filters directly to your theme’s functions.php file, but manual file editing often leads to serious technical issues. Your custom code can disappear every time you update your theme, which forces you to re-add your snippets manually. A single misplaced character can also trigger a critical error that takes your entire website offline.

WPCodeBox eliminates these risks by running your code independently from your theme. It’s the best WordPress snippet plugin that isolates your snippets and comes with intelligent error detection to prevent most mistakes from breaking your site.

wpcodebox snippet plugin

You also get cloud storage to reuse solutions across all your WordPress sites. The built-in code editor offers autocomplete for WordPress functions, hooks, and actions. You can organize snippets in folders, create plugins from code collections, and share access with team members through API keys.

Now that you know WPCodeBox protects your code from theme conflicts, implement the auto-update snippet with these steps:

  1. Purchase the WPCodeBox plugin and install it from your WordPress Plugins menu.
  2. Navigate to WPCodeBox 2 in your admin sidebar to open the snippet creation interface.
  3. Name your snippet “Disable Auto Updates” for easy identification.
  4. Paste the appropriate PHP code from the previous section into the code editor.
  5. Configure these in the settings panel:
    • Type: PHP Snippet
    • How to run the snippet: Always (On Page Load)
    • Where to insert the snippet: Plugins Loaded (Default)
  6. Click Save to store your snippet in a disabled state.
  7. Review your code for syntax errors or missing characters.
  8. Enable the snippet to activate your auto-update preferences immediately.

Your auto-update configuration is now active and protected from theme changes. WPCodeBox keeps your code safe and makes future adjustments simple.

wordpress snippet to disable auto update

Bonus: Disable Auto Updates by Editing the wp-config.php File

You can disable auto-updates at the configuration level by adding a constant to your wp-config.php file. This method works before WordPress even loads its update functions.

Place this code in your wp-config.php file, just above the line that says /* That's all, stop editing! Happy publishing. */. This prevents core automatic updates from running.

define( 'WP_AUTO_UPDATE_CORE', false );

This approach blocks update procedures before WordPress processes them. It works independently of WordPress filters and constants. However, editing wp-config.php directly risks crashing your site if you make a syntax error.

However, WPCodeBox IDE makes editing wp-config.php safe by giving you file manager access with backup and restore capabilities.

WPCodeBox IDE to edit wpconfig file

WPCodeBox IDE provides full file manager access inside WordPress. You can modify wp-config.php, download backups before changes, and restore instantly if something breaks. It works even when WordPress is down, perfect for emergency fixes.

The IDE looks and functions like VSCode with WordPress-specific features. You get syntax highlighting, autocomplete for WordPress functions, and advanced search across your entire codebase. The React-powered UI responds instantly without page refreshes.

The plugin eliminates the need for FTP or cPanel for file editing. You can manage all code changes without leaving your site.

How to Verify Auto Updates are Disabled

You can easily verify if auto-updates are disabled with a few simple checks. These steps can confirm if your code snippet is working correctly.

First, check your WordPress Updates page in the admin dashboard. With core auto-update disabled, you should see a notification with no indication that it’ll be installed automatically.

wordpress auto update disabled

If you have disabled auto-updates completely, you can visit the Plugins and Themes pages. Each item should show Auto-updates disabled in the last column, confirming auto-updates are currently off.

plugin auto update disabled

More on Disabling WordPress Auto Updates

1. How do I turn off auto-updates for WordPress core?

You can disable all automatic core updates by adding a filter to your site. This stops WordPress from updating itself for major, minor, and development releases.

add_filter('auto_update_core', '__return_false');

This snippet ensures your core files remain at their current version until you choose to update manually. If you prefer using a configuration constant, you can add define('WP_AUTO_UPDATE_CORE', false); to your wp-config.php file instead.

2. How do I turn off automatic updates for WordPress plugins?

You can stop all plugins from updating in the background by using a dedicated PHP filter. This prevents third-party plugins from installing changes that might conflict with your theme or other plugins.

add_filter('auto_update_plugin', '__return_false');

3. What is WP_Auto_Update_Core?

WP_AUTO_UPDATE_CORE is a configuration constant used in the wp-config.php file to control how WordPress handles core updates. It allows you to set specific levels of update automation. You can set it to true to enable all core updates, false to disable all core updates, or 'minor' to only allow automatic security and maintenance releases.

4. How do I disable Elementor auto update?

Elementor follows the standard WordPress plugin update system. You can disable its automatic updates along with all other plugins by using the auto_update_plugin filter.

add_filter('auto_update_plugin', '__return_false');

More Ways to Customize Your WordPress Website

Related Tutorials

WPCodeBox is a WordPress Code Snippets Manager that allows you to share your WordPress Code Snippets across your sites.