Tuesday, September 24, 2024

Turn off all updates from wordpress website

Turn off all updates from wordpress website:

Put the below code to wp-config.php file:

define('AUTOMATIC_UPDATER_DISABLED', true);
define('WP_AUTO_UPDATE_CORE', false); // Keeps both major and minor updates off

Put the below code to your current theme's functions.php file:

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

function uniquename_remove_core_updates() {
global $wp_version;
return (object) array('last_checked' => time(), 'version_checked' => $wp_version);
}

add_filter('pre_site_transient_update_core', 'uniquename_remove_core_updates');

function uniquename_remove_plugin_updates() {
remove_action('load-update-core.php', 'wp_update_plugins');
add_filter('pre_site_transient_update_plugins', '__return_null');
}

add_action('admin_init', 'uniquename_remove_plugin_updates');

function uniquename_remove_theme_updates() {
remove_action('load-update-core.php', 'wp_update_themes');
add_filter('pre_site_transient_update_themes', '__return_null');
}

add_action('admin_init', 'uniquename_remove_theme_updates');

.:Happy coding:.

No comments:

Post a Comment

Suomen Kieli (Kello)

In Finnish, telling time follows a specific structure, and understanding it can help you get the hang of the language. Here’s a guide with e...