8
2K
20K
0
03 April 2024
25 September 2018
Based on 8 on WordPress.org
wp-safe-mode
folder.wp-config.php
file:if( !defined('WPMU_PLUGIN_DIR') ) define( 'WPMU_PLUGIN_DIR', dirname(__FILE__).'/wp-content/wp-safe-mode' ); //WP Safe Mode
wp-safe-mode
inside your wp-contents
folder.wp-safe-mode/bootstrap/wp-safe-mode-loader.php
into the newly created wp-safe-mode
folder.wp-safe-mode
folder to your plugins folder in wp-content/plugins
.If your site is broken and you cannot install plugins or access the dashboard, you can modify the loader file temporarily to gain access by following these additional steps:
wp-safe-mode-loader.php
and change this line:public $safe_mode_on = false;
public $safe_mode_on = true;
wp-safe-mode-loader.php
file to the wp-contents/plugins/wp-safe-mode
folder.wp-safe-mode-loader.php
when you want to disable safe mode.You can also enable and disable plugins and themes directy from the loader file code by modifying the properties of the WP_Safe_Mode class, as well as enabling safe mode in different ways such as restricting it to specific IPs.
Please see the PHP code comments within the class for more information on each property.
The loader can also be installed directly into your mu-plugins folder, but we recommend our own installation steps if you already have files in that folder (i.e. it already exists). Otherwise you can also upload it there directly.