Title: Offair &#8211; Branded Error Pages
Author: nolidev
Published: <strong>September 21, 2026</strong>
Last modified: September 22, 2026

---

Search plugins

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

![](https://ps.w.org/offair/assets/icon.svg?rev=3705560)

# Offair – Branded Error Pages

 By [nolidev](https://profiles.wordpress.org/nolidev/)

[Download](https://downloads.wordpress.org/plugin/offair.1.1.0.zip)

 * [Details](https://wordpress.org/plugins/offair/#description)
 * [Reviews](https://wordpress.org/plugins/offair/#reviews)
 *  [Installation](https://wordpress.org/plugins/offair/#installation)
 * [Development](https://wordpress.org/plugins/offair/#developers)

 [Support](https://wordpress.org/support/plugin/offair/)

## Description

When WordPress breaks, it shows screens of its own that no theme and no plugin can
style, because they appear before any of them is loaded:

 * **Error establishing a database connection**, when the database is unreachable.
 * **Briefly unavailable for scheduled maintenance**, while WordPress installs updates.
 * **There has been a critical error on this website**, after a fatal PHP error.

Offair replaces these three screens with a calm page in your colors, with your logo
and your words, and makes them answer with the right HTTP status so that search 
engines and caches treat the outage as temporary.

It also keeps a history of the outages your visitors ran into, and can email you
when the database goes down, then again once the site is back.

This is not a maintenance mode or coming soon plugin. It does not take your site
offline and it does not add a page you switch on. It only covers the moments when
WordPress itself cannot serve your site.

#### How it works

WordPress looks for three special files in `wp-content`, called drop-ins: `db-error.
php`, `maintenance.php` and `php-error.php`. It loads them itself, before any plugin,
which is the only way to show something when the database is down.

The plugin copies one static file shipped in its own folder (`dropins/drop-in.php`)
under these three names. No code is generated. The content of the pages (texts, 
colors, logo) is saved as a JSON file in `wp-content/uploads/offair/`, and the drop-
in reads it when a page has to be shown. What visitors must not see, such as the
alert recipient and the history, is kept next to it in a private folder whose name
cannot be guessed.

#### What you get

 * Four layouts for the three screens: card, minimal, two columns or banner. Each
   shows the logo, the site name, the title, the message, a retry button and an 
   incident line with the local time.
 * Automatic dark mode: the pages follow the light or dark setting of the device
   of the visitor, with an optional logo for dark backgrounds. They can also stay
   always light or always dark.
 * Your logo and colors, detected from the theme, the site icon and Elementor global
   colors when available, editable at any time.
 * Texts in the language of the site until you customize them. French translation
   included.
 * Correct HTTP answers: 503 with a Retry-After header for the database and update
   pages, 503 or 500 for PHP errors (your choice), plus no-cache headers so no cache
   ever keeps an error page.
 * No external dependency: system fonts, logo embedded in the content file, nothing
   loaded from the network.
 * A live preview of each page, rendered by the drop-in itself, exactly as visitors
   will see it.
 * An email alert when the database goes down, off by default. The page itself sends
   it while WordPress cannot run, and WordPress sends a report once the site is 
   back, with the duration of the outage. A test button shows whether your host 
   delivers it.
 * A history of the outages, in its own tab: the date, the page and the HTTP status,
   recorded once a minute at most. Nothing about your visitors is recorded. A notice
   on the dashboard tells you about a database outage you missed.
 * Theme templates: a theme can design any of the three pages itself, with the texts,
   colors and logo from the settings.
 * A status box, a Site Health test and WP-CLI commands.
 * Clean removal: the drop-ins are removed when the plugin is deactivated, and everything
   is removed when it is uninstalled.

The plugin never replaces a `db-error.php`, `maintenance.php` or `php-error.php`
it did not add itself. If one already exists, it tells you and waits for your decision.

#### Developers

 * `offair_settings` filters the settings before the page content is built.
 * `offair_data` filters the page content before it is saved for the drop-in.
 * `offair_incident_resolved` fires once a database outage is over, with the times
   of the first and last pages shown.
 * Theme templates: `offair/db-error.php`, `offair/maintenance.php` and `offair/
   php-error.php` in the active theme or its parent. The variables they receive 
   are listed in the [documentation on GitHub](https://github.com/nolidev-fr/offair#theme-templates).
 * WP-CLI: `wp offair status`, `generate [--force]`, `remove [--force]`, `preview
   <db|maintenance|php>`, `history`.

## Screenshots

[⌊The database error page as visitors see it: logo, message, retry button and incident
line.⌉⌊The database error page as visitors see it: logo, message, retry button and
incident line.⌉[

The database error page as visitors see it: logo, message, retry button and incident
line.

[⌊The settings page: state of the three pages, logo, colors and fonts.⌉⌊The settings
page: state of the three pages, logo, colors and fonts.⌉[

The settings page: state of the three pages, logo, colors and fonts.

[⌊One tab per page, with the live preview rendered exactly as visitors will see 
it.⌉⌊One tab per page, with the live preview rendered exactly as visitors will see
it.⌉[

One tab per page, with the live preview rendered exactly as visitors will see it.

## Installation

 1. Install and activate the plugin from Plugins, Add New.
 2. Open Settings, Offair. The logo and primary color of your site are pre-filled when
    they can be detected.
 3. Adjust the texts and colors, save. The preview shows the result.

On activation the plugin copies its drop-in to `wp-content` under the three names
WordPress expects, and saves the page content in `wp-content/uploads/offair/`. If`
wp-content` is not writable, download the drop-ins from the settings page and upload
them yourself, once.

## FAQ

### Is this a maintenance mode plugin?

No. It does not let you put your site offline. It styles the screens WordPress shows
on its own when the database is down, while updates are installed and after a fatal
error. It works alongside any maintenance mode or coming soon plugin.

### Why does the plugin add files to wp-content?

Because WordPress only looks for these drop-ins there, and loads them before any
plugin. That is the only way to show a page when the database is down. The three
files are identical copies of `dropins/drop-in.php` from the plugin folder. They
are removed when the plugin is deactivated or uninstalled.

### Why is the content saved as a file and not in the database?

The database is precisely what may be unreachable when the page is shown. The content
is saved in the uploads folder, in `offair/pages.json`, and contains only what the
visitors see on the page. The alert settings and the history are kept in a private
folder next to it.

### Does it work with page caching (LiteSpeed Cache, WP Rocket, Cloudflare)?

Yes. Pages already in the cache keep being served normally during an outage, which
is what you want. Only requests that reach PHP see the outage page, and that page
is sent with headers that prevent it from being cached.

### Does it cover a web server or PHP outage?

No. If the web server or PHP itself is down, nothing on the site can run. Only your
host can show a page in that case.

### The status box says a file was not added by the plugin.

Another plugin or a person placed a file with the same name in `wp-content`. The
plugin leaves it untouched. Open the Advanced tab to replace it if you want to.

### Does the plugin need output buffering in PHP?

No. The database and update pages never depend on it, and the PHP error page works
without it as long as PHP does not print errors on screen, which is the normal configuration
of a live site.

There is one combination WordPress cannot handle: errors printed on screen (usually
because WP_DEBUG and WP_DEBUG_DISPLAY are enabled) together with output buffering
off. PHP then sends the raw error and the headers before WordPress runs its handler,
so no error page, branded or not, can be shown. The settings page and Site Health
detect this combination and explain the two fixes: disable WP_DEBUG_DISPLAY on a
live site, or set output_buffering to 4096 in the PHP configuration.

### Does the plugin send emails or contact any service?

Only if you turn on the email alert, and only to the address you choose. The alert
is sent by your own server. Nothing else leaves it: there is no tracking, no update
check and no external asset.

### Why does the alert sometimes not arrive?

While the database is down WordPress cannot run, so the alert is sent with the mail
function of PHP, not through your email plugin. Some hosts block it and some inboxes
file it as spam. Use the test button in the Database error tab: the test travels
exactly the same way. The report sent once the site is back goes through WordPress,
like your other emails. It leaves once the error page has not been shown for five
minutes, at the next scheduled check or as soon as someone opens the admin.

### What does the history record?

The date, the page and the HTTP status, once a minute at most, each time a visitor
sees one of the pages. Nothing about the visitors themselves. The history is kept
for 180 days and removed when the plugin is uninstalled. An outage while nobody 
visits the site cannot be seen.

### Can my theme design the pages?

Yes. Add `offair/db-error.php`, `offair/maintenance.php` or `offair/php-error.php`
to your theme or child theme. The page then uses your template instead of the built-
in one. It receives the texts, colors and logo from the settings, the built-in markup
and an escaping function. WordPress is not loaded when these pages are shown, so
a template can only use plain PHP. If a template fails, the built-in page is shown
instead.

### Does it work on multisite?

Yes. The drop-ins are shared by every site of the network, so the settings live 
in the network admin under Settings, Offair. Each site still gets its own page, 
found from the address the visitor asked for: its title, its logo or site icon, 
its language, its timezone and the templates of its own theme. The design, the colors
and the texts are shared by the network.

## Reviews

There are no reviews for this plugin.

## Contributors & Developers

“Offair – Branded Error Pages” is open source software. The following people have
contributed to this plugin.

Contributors

 *   [ nolidev ](https://profiles.wordpress.org/nolidev/)

[Translate “Offair – Branded Error Pages” into your language.](https://translate.wordpress.org/projects/wp-plugins/offair)

### Interested in development?

[Browse the code](https://plugins.trac.wordpress.org/browser/offair/), check out
the [SVN repository](https://plugins.svn.wordpress.org/offair/), or subscribe to
the [development log](https://plugins.trac.wordpress.org/log/offair/) by [RSS](https://plugins.trac.wordpress.org/log/offair/?limit=100&mode=stop_on_copy&format=rss).

## Changelog

#### 1.1.0

 * New: email alert when the database goes down, and a report once the site is back.
   Off by default, with a test button.
 * New: history of the pages shown to visitors, in a new History tab, and a dashboard
   notice after a database outage.
 * New: theme templates. A theme can replace any of the three pages with its own
   design.
 * New: four layouts: card, minimal, two columns and banner.
 * New: automatic dark mode, with an optional logo for dark backgrounds. The pages
   can also stay always light or always dark.
 * New: on a network, each site gets its own page, with its title, logo, language,
   timezone and theme templates.
 * New: `offair_incident_resolved` action and `wp offair history` command.
 * Fix: a site icon in a format the pages cannot show, such as AVIF, was left out
   of the pages. It is now embedded as PNG.

#### 1.0.3

 * Fix: a logo in a format the pages cannot show, such as AVIF, was left out without
   any warning. It is now embedded as PNG.
 * The PHP error page no longer reloads itself every minute by default: a fatal 
   error rarely clears on its own, and each reload runs into it again. Sites that
   kept the former default switch to no reload, a delay set by hand is kept.
 * When the automatic refresh is turned off, the page no longer says that it refreshes
   on its own.

#### 1.0.2

 * After an update, the pages are brought up to date on the first request, without
   waiting for someone to open the admin.

#### 1.0.1

 * Fix: an SVG logo over 150 KB that only wraps one image, as design tools export
   them, was left out of the pages. The image is now taken out and resized like 
   any other logo.
 * New: optional button text color. Left empty, the choice stays automatic.
 * The automatic button text is now white on mid-tone colors, with the button slightly
   darkened when needed, instead of dark text that was hard to read. The label always
   reaches a 4.5:1 contrast.
 * The settings page warns when the chosen logo cannot be embedded.

#### 1.0.0

 * Initial release: branded pages for database connection errors, the update notice
   and fatal PHP errors.
 * Settings page with status box, live preview, manual download and per-page options.
 * Logo and color detection, texts in the language of the site, French translation.
 * Site Health test and WP-CLI commands.

## Meta

 *  Version **1.1.0**
 *  Last updated **19 hours ago**
 *  Active installations **10+**
 *  WordPress version ** 6.0 or higher **
 *  Tested up to **7.1.2**
 *  PHP version ** 7.4 or higher **
 * Tags
 * [503](https://wordpress.org/plugins/tags/503/)[database](https://wordpress.org/plugins/tags/database/)
   [downtime](https://wordpress.org/plugins/tags/downtime/)[error page](https://wordpress.org/plugins/tags/error-page/)
   [fatal error](https://wordpress.org/plugins/tags/fatal-error/)
 *  [Advanced View](https://wordpress.org/plugins/offair/advanced/)

## Ratings

No reviews have been submitted yet.

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

[See all reviews](https://wordpress.org/support/plugin/offair/reviews/)

## Contributors

 *   [ nolidev ](https://profiles.wordpress.org/nolidev/)

## Support

Got something to say? Need help?

 [View support forum](https://wordpress.org/support/plugin/offair/)