Skip to content

Instantly share code, notes, and snippets.

@jinsley8
Last active October 18, 2024 21:09
Show Gist options
  • Save jinsley8/127ec4f1cc7388fe512297891ebc549f to your computer and use it in GitHub Desktop.
Save jinsley8/127ec4f1cc7388fe512297891ebc549f to your computer and use it in GitHub Desktop.
Disable WordPress auto-updates
<?php
/*
* Plugin Name: Disable Automatic Updates
* Description: Prevents WordPress from performing automatic updates
* Author: Jon Insley
* Author URI: https://joninsley.com/
* License: GNU General Public License v2 or later
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
*
*/
// Standard plugin security, keep this line in place.
if (!defined('ABSPATH') || !is_dir(ABSPATH)) {
return;
}
// Disable all automatic updates
add_filter( 'automatic_updater_disabled', '__return_true' );
// Disable core updates
add_filter( 'auto_update_core', '__return_false' );
// Disable plugin updates
add_filter( 'auto_update_plugin', '__return_false' );
// Disable theme updates
add_filter( 'auto_update_theme', '__return_false' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment