Created
August 24, 2018 09:48
-
-
Save sofasurfer/0f374a8bbe94c8d3bec9985015a5b5a6 to your computer and use it in GitHub Desktop.
WP Disable 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 | |
/** | |
* Disable the Plugin and Theme Editor. | |
* | |
* Occasionally you may wish to disable the plugin or theme editor to prevent overzealous users from being able to edit | |
* sensitive files and potentially crash the site. Disabling these also provides an additional layer of security if a hacker | |
* gains access to a well-privileged user account. | |
* | |
* @see https://codex.wordpress.org/Editing_wp-config.php#Disable_the_Plugin_and_Theme_Editor | |
*/ | |
if (!defined('DISALLOW_FILE_EDIT')) define('DISALLOW_FILE_EDIT', true); | |
/** | |
* Disable Plugin and Theme Update and Installation. | |
* | |
* This will block users being able to use the plugin and theme installation/update functionality from the WordPress admin area. | |
* Setting this constant also disables the Plugin and Theme editor (i.e. you don't need to set DISALLOW_FILE_MODS and | |
* DISALLOW_FILE_EDIT, as on its own DISALLOW_FILE_MODS will have the same effect). | |
* | |
* @see https://codex.wordpress.org/Editing_wp-config.php#Disable_Plugin_and_Theme_Update_and_Installation | |
*/ | |
if (!defined('DISALLOW_FILE_MODS')) define('DISALLOW_FILE_MODS', true); | |
/** | |
* Disable all automatic updates. | |
* | |
* @see https://codex.wordpress.org/Editing_wp-config.php#Disable_WordPress_Auto_Updates | |
*/ | |
if (!defined('AUTOMATIC_UPDATER_DISABLED')) define('AUTOMATIC_UPDATER_DISABLED', true); | |
/** | |
* Disable all core updates. | |
* | |
* @see https://codex.wordpress.org/Editing_wp-config.php#Disable_WordPress_Core_Updates | |
*/ | |
if (!defined('WP_AUTO_UPDATE_CORE')) define('WP_AUTO_UPDATE_CORE', false); | |
if (!defined('OTGS_DISABLE_AUTO_UPDATES')) define('OTGS_DISABLE_AUTO_UPDATES', true); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment