Title: Graceful Error Pages
Author: Bojan Josifoski
Published: <strong>2026 年 6 月 5 日</strong>
Last modified: 2026 年 6 月 5 日

---

搜索插件

![](https://ps.w.org/graceful-error-pages/assets/banner-772x250.png?rev=3562236)

![](https://ps.w.org/graceful-error-pages/assets/icon.svg?rev=3562236)

# Graceful Error Pages

 作者：[Bojan Josifoski](https://profiles.wordpress.org/josifoskibojan/)

[下载](https://downloads.wordpress.org/plugin/graceful-error-pages.1.0.7.zip)

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

 [支持](https://wordpress.org/support/plugin/graceful-error-pages/)

## 描述

Every WordPress site shows the same plain white error screen when something goes
wrong.
 It looks broken. It destroys trust. Graceful Error Pages replaces it with
a page that matches your brand — automatically, the moment you activate it.

**What it replaces:**

 * The `wp_die()` error screen (permission errors, expired links, security blocks)
 * PHP fatal error screens (white screen of death)

**Features:**

 * **Zero-config activation** — works immediately with auto-detected site name, 
   logo, and colors
 * **Five built-in templates** — Minimal, Corporate, Friendly, Dark, and Starter
 * **Brand customization** — logo, colors, heading, message, and redirect URL
 * **Merge tags** — dynamic content like {site_name} and {year}
 * **Self-contained styling** — no theme or CDN dependencies (works even during 
   fatal errors)
 * **API safe** — only overrides HTML output; REST API, AJAX, and JSON responses
   are untouched
 * **WP-CLI safe** — automatically skips CLI contexts
 * **Lightweight** — zero overhead on normal page loads; only runs when an error
   occurs
 * **Fully translatable** — all strings use WordPress i18n functions

**How it works:**

 1. Activate the plugin
 2. Your site’s error pages are instantly branded with auto-detected settings
 3. Optionally customize via Settings > Error Pages

**Source Code**

The full source code, including unminified JavaScript and build tools, is available
at:
 [github.com/codeverbojan/graceful-error-pages](https://github.com/codeverbojan/graceful-error-pages)

To build from source:

 1. Clone the repository
 2. Run `composer install`
 3. Run `npm install`
 4. Run `npm run build`

## 屏幕截图

[⌊The default Minimal template replacing the WordPress error screen.⌉⌊The default
Minimal template replacing the WordPress error screen.⌉[

The default Minimal template replacing the WordPress error screen.

[⌊The settings page — Design tab with template picker.⌉⌊The settings page — Design
tab with template picker.⌉[

The settings page — Design tab with template picker.

[⌊The settings page — Content tab with messaging options.⌉⌊The settings page — Content
tab with messaging options.⌉[

The settings page — Content tab with messaging options.

[⌊The Corporate template with site logo.⌉⌊The Corporate template with site logo.⌉[

The Corporate template with site logo.

[⌊The Dark template with dark mode styling.⌉⌊The Dark template with dark mode styling
.⌉[

The Dark template with dark mode styling.

## 安装

 1. Upload the `graceful-error-pages` folder to `/wp-content/plugins/`
 2. Activate the plugin through the ‘Plugins’ menu in WordPress
 3. That’s it — error pages are now branded automatically
 4. Optionally go to **Settings > Error Pages** to customize the template, colors, 
    and messaging

## 常见问题

### Does this work out of the box?

Yes. On activation the plugin auto-detects your site name, logo, and brand color
from your
 WordPress settings. Works with both classic and block (FSE) themes. No
configuration is required.

### Which error screens does this replace?

Two types: (1) the `wp_die()` screen shown for permission errors, expired nonces,
and
 similar issues, and (2) the PHP fatal error screen (white screen of death).

### Will this break my REST API or AJAX?

No. The plugin only overrides the HTML die handler. REST API, AJAX, JSON, and JSONP

handlers are left completely untouched.

### Does this work with WP-CLI?

Yes. The plugin detects CLI contexts and skips the custom handler entirely.

### Does this affect wp-admin?

Not by default. The handler only fires on the front end unless you explicitly enable

admin override in the settings.

### Can I create my own template?

The five built-in templates cover most use cases. Custom template support is planned

for a future release.

### Does this work with WooCommerce?

Yes. The plugin works with any WordPress site, including WooCommerce stores. Error
pages
 are styled independently of your theme or any other plugin.

### Does the plugin load anything on every page?

No. The plugin registers its handler on init but only renders output when `wp_die()`
is
 actually called or a fatal error occurs. There is zero performance impact on
normal pages.

## 评价

此插件暂无评价。

## 贡献者及开发者

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

贡献者

 *   [ Bojan Josifoski ](https://profiles.wordpress.org/josifoskibojan/)

[帮助将「Graceful Error Pages」翻译成简体中文。](https://translate.wordpress.org/projects/wp-plugins/graceful-error-pages)

### 对开发感兴趣吗?

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

## 更新日志

#### 1.0.7

 * Fix: Replace inline onclick handlers with wp_print_inline_script_tag

#### 1.0.6

 * Fix: Increase PHPStan memory limit to 1G for CI

#### 1.0.5

 * Fix: Remove dead sanitizer wrappers, add request method check

#### 1.0.4

 * Fix: Wp.org compliance — use wp_enqueue_style for all CSS output

#### 1.0.3

 * Fix author metadata and plugin URI across all files

#### 1.0.2

 * Add FSE/block theme brand color detection, fix PCP warnings

#### 1.0.1

 * Add @wordpress/scripts build process, rename prefix to gcep, upgrade PHPStan 
   2

#### 1.0.0

 * Initial release
 * Custom wp_die() handler with branded error pages
 * PHP fatal error shutdown handler with self-contained styling
 * Five built-in templates: Minimal, Corporate, Friendly, Dark, Starter
 * Admin settings page under Settings > Error Pages
 * Auto-detection of site name, logo, and brand color on activation
 * Merge tags for dynamic content
 * Full i18n support

## 额外信息

 *  版本 **1.0.7**
 *  最后更新：**6 天前**
 *  活跃安装数量 **不到10**
 *  WordPress 版本 ** 6.4 或更高版本 **
 *  已测试的最高版本为 **7.0**
 *  PHP 版本 ** 8.0 或更高版本 **
 *  语言
 * [English (US)](https://wordpress.org/plugins/graceful-error-pages/)
 * 标签
 * [branding](https://cn.wordpress.org/plugins/tags/branding/)[error handling](https://cn.wordpress.org/plugins/tags/error-handling/)
   [error page](https://cn.wordpress.org/plugins/tags/error-page/)
 *  [高级视图](https://cn.wordpress.org/plugins/graceful-error-pages/advanced/)

## 评级

尚未提交反馈。

[Your review](https://wordpress.org/support/plugin/graceful-error-pages/reviews/#new-post)

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

## 贡献者

 *   [ Bojan Josifoski ](https://profiles.wordpress.org/josifoskibojan/)

## 支持

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

 [查看支持论坛](https://wordpress.org/support/plugin/graceful-error-pages/)