Free WordPress plugin · Version 1.3.4

Safety Exit Button: a quick-exit button for WordPress

Give visitors a one-click way to leave your site fast. Safety Exit Button adds a fixed, always-visible exit button that opens a safe site in a new tab, tries to close the current one, and clears session data so the Back button can’t bring the page back. Built for domestic-violence shelters, crisis lines, legal aid, health clinics and any site where privacy matters.

  • Free and open source (GPLv2+)
  • Works with any theme
  • No tracking, no external calls
  • WordPress 5.8+, PHP 7.4+
  • Tested up to WordPress 6.9
Sparx, the Clicksmith mascot, pointing at the plugin details

What it does

Everything is configured from the WordPress dashboard. No code, no theme edits, and nothing leaves the visitor’s browser.

One-click exit

Opens a safe destination (Google by default) in a new tab, then tries to close the tab the visitor was on. If the browser blocks closing, that tab is redirected to the safe site instead.

Escape key shortcut

Pressing the Escape key triggers the same exit, so a visitor never has to reach for the mouse. It can be switched off in Settings.

Clears browsing traces

Session storage is wiped and any localStorage keys that start with your chosen prefixes are removed, so the page can’t be restored from the Back button.

Styled from the dashboard

Set the label, colors, size, padding, font, shape (square, rounded, pill or a custom radius), shadow, corner position, edge offsets and z-index. No CSS required.

Accessible by default

The button is a real HTML button with a configurable screen-reader label, a large tap target and keyboard focus. It sits above every other element on the page.

Private by design

No cookies, no analytics, no requests to Clicksmith or anyone else. The only outbound request is the exit destination you choose.

How the exit works

  1. The visitor clicks the button or presses Escape.Both paths run the same exit routine.
  2. Browser storage is cleared.Session storage is emptied and localStorage keys matching your prefixes are removed.
  3. The exit URL opens in a new tab.It opens with noopener and noreferrer, so the new page can’t see where the visitor came from.
  4. The original tab is closed or replaced.Browsers only let scripts close tabs they opened, so when closing is blocked the current page is immediately replaced with the exit URL. Pressing Back does not return to your site.

Quick setup

  1. Install and activate.In WordPress go to Plugins, Add New, search for “Safety Exit Button”, then Install and Activate. You can also upload the ZIP from WordPress.org.
  2. Open the Safety Exit Button menu.It appears as a top-level item in the WordPress admin menu, with Settings and About tabs.
  3. Set your text, exit URL, position and colors.Save changes. The defaults work out of the box if you want to skip this step.
  4. Test it.Open your site in a private window, click the button, and confirm the Back button doesn’t return to the page.

Settings reference

Every option lives under Safety Exit Button, Settings. These are the defaults that ship with version 1.3.4.

SettingDefaultWhat it controls
EnabledOnShows the button on every front-end page.
Button textExit SiteThe label visitors see.
Exit URLhttps://www.google.comThe safe destination opened on exit. Use any neutral site.
ESC key triggers exitOnLets the Escape key run the exit.
Accessible labelQuick exitThe aria-label read by screen readers.
PositionBottom rightBottom right, bottom left, top right or top left.
Offset X / Offset Y20 px / 20 pxDistance from the screen edges.
Z-index999999Keeps the button above sticky headers, popups and chat widgets.
Background / text color#00B0D9 / #FFFFFFAny colors. Pick a high-contrast pair so the button is easy to spot.
Padding (vertical / horizontal)12 px / 16 pxOverall button size.
Font size / weight14 px / 600Label typography.
ShapeRoundedSquare, rounded, pill, or a custom radius (8 px by default).
Box shadowOnA soft shadow that separates the button from page content.
localStorage prefixesquickexit_Comma-separated key prefixes to remove on exit. Only matching keys are deleted, so your theme’s own storage is untouched.

Important note. No website can guarantee removing a visit from a browser’s History list or force every browser to close a tab. This plugin focuses on the industry-standard goal: immediate exit and preventing accidental return via the Back button. Pair it with a visible reminder that visitors can clear their history, and with a site that avoids memorable titles in the tab.

External services. The plugin sends nothing to Clicksmith. When the default exit URL is kept, the visitor is sent to Google, which is covered by the Google Terms of Service and Privacy Policy.

Frequently asked questions

Does it remove the page from the browser history?

No. Browsers control the History list and no site can delete entries from it. What the plugin does is stop the page from coming back when the Back button is pressed, by replacing the current page and clearing session storage.

Does it close the tab?

It tries. Most browsers only let a script close a tab that the script opened, so when closing is blocked the current tab is redirected to the exit URL instead. Either way the visitor lands on a neutral site.

Will it break my theme, Elementor or another plugin that uses browser storage?

No. By default only session storage is cleared. localStorage keys are removed only when they start with a prefix you list in Settings, so everything else on the site keeps working.

Can I move the button or change how it looks?

Yes. Choose any of the four corners, set pixel offsets from the edges, and adjust colors, size, font and shape from the Settings tab. No CSS is needed, but you can still target the button in your own stylesheet if you want to.

Does it work with caching and page builders?

Yes. The button is printed in the footer as standard markup with a small script loaded through the WordPress enqueue system, so it works with page caches, CDNs, Elementor, Divi and block themes without any changes.

Is it really free?

Yes. Safety Exit Button is licensed under the GPLv2 or later and has no premium tier. If it helps your organization, a donation keeps development going.

What’s new

  • 1.3.4 Updated the donation link to the new Clicksmith portal.
  • 1.3.3 Added plugin-list links, a Resources block on the About tab and donation links.
  • 1.3.2 The exit now opens the new tab before trying to close the old one. Fixed uninstall cleanup and added prefix-based localStorage cleanup.
  • 1.3.1 Fixed the click handler.
  • 1.3.0 Public plugin URI, scripts loaded through wp_enqueue, external services documented, sanitized inline CSS.
  • 1.2.5 Moved to a top-level admin menu with an About tab.

The full changelog is on the WordPress.org plugin page.

Need a custom version?

Clicksmith builds and maintains WordPress plugins for organizations that need something specific: custom exit triggers, multilingual labels, or a button that also clears your intake forms. Tell us what you need.

Open a Support Request

Clicking below will take you to our external support portal where you can open a ticket.