Last active
October 18, 2024 21:09
-
-
Save jinsley8/127ec4f1cc7388fe512297891ebc549f to your computer and use it in GitHub Desktop.
Disable WordPress auto-updates
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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