Title: Safe Mode
Author: Uffe Fey
Published: <strong>2012 年 10 月 19 日</strong>
Last modified: 2018 年 12 月 20 日

---

搜索插件

![](https://ps.w.org/safe-mode/assets/banner-772x250.png?rev=1003285)

**该插件尚未通过WordPress的最新3个主要版本进行测试**。 当与较新版本的WordPress一起
使用时，可能不再受到维护或支持，并且可能会存在兼容性问题。

![](https://ps.w.org/safe-mode/assets/icon-128x128.png?rev=1003915)

# Safe Mode

 作者：[Uffe Fey](https://profiles.wordpress.org/wpkonsulent/)

[下载](https://downloads.wordpress.org/plugin/safe-mode.zip)

 * [详情](https://cn.wordpress.org/plugins/safe-mode/#description)
 * [评价](https://cn.wordpress.org/plugins/safe-mode/#reviews)
 *  [安装](https://cn.wordpress.org/plugins/safe-mode/#installation)
 * [开发进展](https://cn.wordpress.org/plugins/safe-mode/#developers)

 [支持](https://wordpress.org/support/plugin/safe-mode/)

## 描述

This plugin enables safe mode for WordPress. This means:

 * No plugins will be loaded.
 * A default theme will be temporarily activated (if it is installed).

#### Why is this useful?

Whenever something’s wrong with a WordPress site, the first rule of thumb is to 
disable plugins and revert to the default theme if possible. Depending on the nature
of the error, that is not always an option. The back end (dashboard) may also be
down or you may not have FTP access to manually disable plugins and themes.

**Enter Safe Mode**. Safe Mode will completely disable all plugins and the active
theme temporarily for a single page view – ultimately enabling you to log in and
remove the offending plugin. (This is not guaranteed to work in all scenarios, please
read the disclaimer)

#### How does it work?

If your site crashes due to an upsetting plugin or theme, all you have to do is 
add a querystring parameter to the URL. Doing that will temporarily disable all 
plugins for that single page view, as well as temporarily activate a default theme
if one is installed.

Let’s say you’re the owner of www.example.com. To enable safe mode for one particular
page, you add this to the URL: “?safe_mode=1”.

Bear in mind that you have to do this for every view. The querystring parameter 
isn’t carried on automatically. So, for instance:

 * If you need to log in, go to: www.example.com/wp-admin/?safe_mode=1
 * If you need to go to plugin management, go to: www.example.com/wp-admin/plugins.
   php?safe_mode=1
 * If you need to go to theme management, go to: www.example.com/wp-admin/themes.
   php?safe_mode=1

When you go to plugin management, all plugins will seem to be deactivated (due to
the way Safe Mode works), but you’ll still be able to explicitly deactivate each
plugin. Just use the “Deactivate (safe mode)” option.

#### What are default themes?

By default theme, I’m referring to the themes that ships with WordPress, you know,
the Twenty “something” ones.

The plugin checks if any of these themes are installed, and if so, activates the
first theme it encounters. Thus I highly recommend that you keep one of those themes
installed at all times. If you don’t, safe mode will keep your current active theme,
and that theme may just be the offender – leaving safe mode useless. Keep this in
mind.

#### Disclaimer

This plugin will be able to handle many scenarios, but not all. If your site’s crash
is caused by a database crash, or something that simply brings down the PHP parser,
like a call to an undefined function, Safe Mode won’t be able to do anything about
that.

## 安装

 1. Upload the `safe-mode` folder to the `/wp-content/plugins/` directory
 2. Activate the plugin through the ‘Plugins’ menu in WordPress

NOTE: Upon activation, the plugin tries to copy a file to the `/wp-content/mu-plugins/`
directory. If the `mu-plugins` directory does not exist, the plugin will attempt
to create it and copy the file. Depending on your file permissions it may not be
successful. If not, you’ll have to create the directory manually and copy the file`/
wp-content/plugins/safe-mode/loader/safe-moder-loader.php` to the `/wp-content/mu-
plugins/` directory.

## 常见问题

No questions asked so far..

## 评价

![](https://secure.gravatar.com/avatar/02a76d95b36cbc866cf2652b1a0739943346028e0564ba8735ed59744c41cfe7?
s=60&d=retro&r=g)

### 󠀁[Fantastic.](https://wordpress.org/support/topic/fantastic-2535/)󠁿

 [con](https://profiles.wordpress.org/conschneider/) 2020 年 8 月 3 日

I love using Health Check. And starting today I love this as well. Using a URL parameter
for selective application is ***** alone. Keep it up!

![](https://secure.gravatar.com/avatar/5e1f5a0ce6a49eb77f4393f4e291c0d994e24a34e70873bcb4284ae35f585cd8?
s=60&d=retro&r=g)

### 󠀁[Doesn’t work, waste of time](https://wordpress.org/support/topic/doesnt-work-waste-of-time-5/)󠁿

 [promediallc](https://profiles.wordpress.org/promediallc/) 2020 年 7 月 7 日 1 
回复

Plugin does not work. Complete waste of time. Zero stars.

 [ 阅读所有6条评价 ](https://wordpress.org/support/plugin/safe-mode/reviews/)

## 贡献者及开发者

「Safe Mode」是开源软件。 以下人员对此插件做出了贡献。

贡献者

 *   [ Uffe Fey ](https://profiles.wordpress.org/wpkonsulent/)

[帮助将「Safe Mode」翻译成简体中文。](https://translate.wordpress.org/projects/wp-plugins/safe-mode)

### 对开发感兴趣吗?

您可以[浏览代码](https://plugins.trac.wordpress.org/browser/safe-mode/)，查看[SVN仓库](https://plugins.svn.wordpress.org/safe-mode/)，
或通过[RSS](https://plugins.trac.wordpress.org/log/safe-mode/?limit=100&mode=stop_on_copy&format=rss)
订阅[开发日志](https://plugins.trac.wordpress.org/log/safe-mode/)。

## 更新日志

#### 1.1.3

 * Code maintenance – nothing new in terms of features has been added.
 * Added support for new default themes in case the theme constant WP_DEFAULT_THEME
   somehow doesn’t work.

#### 1.1.2

 * If you need to, you can keep certain plugins active by modifying an array in 
   safe-mode-loader.php. Comments in the source code have been added, explaining
   how to do that. Thanks to KZeni for suggesting that in the support forum.
 * Added Twenty Fourteen and Fifteen (for future support) to the list of default
   themes.

#### 1.1.1

 * Fixed embarrassing typo and removed warnings. Thanks to Doug Sparling for pointing
   it out.

#### 1.1

 * Changed default theme “guessing” to use the constant WP_DEFAULT_THEME. Also added
   Twenty Thirteen to the fallback in case said constant isn’t defined.

#### 1.0

 * Initial release.

## 额外信息

 *  版本 **1.1.3**
 *  最后更新：**7 年前**
 *  活跃安装数量 **100+**
 *  WordPress 版本 ** 3.0.1 或更高版本 **
 *  已测试的最高版本为 **5.0.25**
 *  语言
 * [English (US)](https://wordpress.org/plugins/safe-mode/)
 * 标签
 * [debug](https://cn.wordpress.org/plugins/tags/debug/)[error](https://cn.wordpress.org/plugins/tags/error/)
   [recovery](https://cn.wordpress.org/plugins/tags/recovery/)[safe mode](https://cn.wordpress.org/plugins/tags/safe-mode/)
 *  [高级视图](https://cn.wordpress.org/plugins/safe-mode/advanced/)

## 评级

 4.2 星（最高 5 星）。

 *  [  4 条 5 星评价     ](https://wordpress.org/support/plugin/safe-mode/reviews/?filter=5)
 *  [  0 条 4 星评价     ](https://wordpress.org/support/plugin/safe-mode/reviews/?filter=4)
 *  [  0 条 3 星评价     ](https://wordpress.org/support/plugin/safe-mode/reviews/?filter=3)
 *  [  0 条 2 星评价     ](https://wordpress.org/support/plugin/safe-mode/reviews/?filter=2)
 *  [  1 条 1 星评价     ](https://wordpress.org/support/plugin/safe-mode/reviews/?filter=1)

[Your review](https://wordpress.org/support/plugin/safe-mode/reviews/#new-post)

[查看全部评论](https://wordpress.org/support/plugin/safe-mode/reviews/)

## 贡献者

 *   [ Uffe Fey ](https://profiles.wordpress.org/wpkonsulent/)

## 支持

有话要说吗？是否需要帮助？

 [查看支持论坛](https://wordpress.org/support/plugin/safe-mode/)