Last Switch — Inactivity Timer, Lock & Testament
Every life inevitably comes to an end—and sometimes it arrives unexpectedly. Prepare your website and digital legacy for that day while you still can. Last Switch is a digital legacy and privacy switch for WordPress blogs, personal journals, and private archives. While you are active, your site runs
Every life inevitably comes to an end—and sometimes it arrives unexpectedly. Prepare your website and digital legacy for that day while you still can.
Last Switch is a digital legacy and privacy switch for WordPress blogs, personal journals, and private archives.
While you are active, your site runs in Public Mode by default (normal website), or you can switch it to Private Mode (locked with 200 , 403 , or 404 status and REST API protection). If an administrator does not log in for a configured number of days (default: 10 days), the switch triggers automatically.
Use Cases
- Public blog that transitions to a memorial or handover page: Run your site normally in Public Mode while active, and automatically switch to a Block Editor testament/memorial page after your configured inactivity period passes without administrator activity.
- Private diary with passcode access in an emergency: Use Private Mode while active so your site stays hidden from the public, and configure a testament page with passcode unlock and email notification so trusted family members can access it if needed.
Key Features
- Two Active Modes (While You Are Active): Public Mode (Default): Your site operates normally and is visible to everyone.
- Private Mode: Blocks all unauthenticated visitors and /wp-json/ REST API requests with a 200 , 403 , or 404 status and a customizable HTML screen.
- Block Editor Testament Page: Select any WordPress Page (including Private or Draft pages) designed with the Block Editor (Gutenberg) to serve as your final message or testament.
- Two Post-Inactivity Behaviors: Show Testament + Passcode Unlock Screen: Displays your testament full-screen along with a floating passcode bar. Trusted contacts with the passcode can unlock and read the entire site.
- Show Testament Only: Displays only your testament page full-screen while keeping the rest of your site and REST API locked.
- Automated Email Notification: Optionally sends a custom notification email to one or more trusted recipients as soon as the inactivity period expires.
A closer look.
- 01Upload the last-switch folder to the /wp-content/plugins/ directory, or install the plugin through the WordPress plugins screen directly.
- 02Activate the plugin through the ‘Plugins’ screen in WordPress.
- 03Create a Page in Pages > Add New using the Block Editor for your testament (keep its visibility set to Private or Draft so it stays hidden while you are active).
- 04Go to Settings > Last Switch to configure your active mode, inactivity days, testament page, post-inactivity action, unlock passcode, and optional email notification.
Frequently asked questions.
How does the timer reset?
Every time an administrator ( manage_options capability) logs in or visits the site while logged in, the last activity timestamp and email notification flag are automatically reset.
Does running a server-side cron job (e.g., hitting wp-cron.php hourly) reset the inactivity timer?
No. A server-side cron request to wp-cron.php runs as an unauthenticated (logged-out) request, so it will not update the “Last recorded administrator activity” timestamp.
The inactivity timer is only reset when an authenticated user with administrator privileges ( manage_options capability) logs in or visits the site. In fact, triggering wp-cron.php regularly via a server cron job is recommended, as it ensures that scheduled inactivity checks and notification emails run reliably on time.
How should I set the visibility of my Testament Page?
Set your testament Page to Private or Draft in WordPress. This ensures nobody can access it via URL while you are active. Once the inactivity period expires, the plugin renders its Block Editor content automatically on the switch screen.
How can I test the switch without waiting 10 days?
Go to Settings > Last Switch , set Inactivity Period (Days) to 0 , and save changes. Open an incognito/private browser window to preview your testament and passcode screen, then set the days back to 10 . You can also use the Send Test Email button on the settings page to verify email delivery immediately.
How does the plugin behave if the site has multiple administrators?
The inactivity timer tracks activity across all users with administrator privileges ( manage_options capability) as a single shared timer for the site.
- If any administrator logs in or visits the site while logged in, the “Last recorded administrator activity” timestamp is reset.
- The switch will only trigger after all administrators have been inactive for the configured duration.
- Non-administrator roles (such as Editor, Author, Contributor, or Subscriber) do not reset the timer.
Tip: If you are using this plugin for personal digital legacy purposes, make sure to remove or downgrade any unused third-party administrator accounts (such as former developers or agencies), as logins from those accounts will also reset the timer.
Is it safe to include passwords or sensitive credentials in the notification email body?
We strongly recommend not including master passwords, WordPress admin credentials, server logins, or financial passwords directly in the email body.
Because email content is stored in your WordPress database and passes through mail servers and inboxes in plain text, any sensitive credentials written there could be exposed if your database, email logs, or the recipient’s inbox is compromised.
Recommended best practices:
- Share locations or hints instead of raw passwords: Mention where your important credentials are securely stored (for example, in a password manager’s emergency access vault or a physical document at home) rather than writing the passwords themselves.
- Limit email codes to the dedicated site passcode: If you include an access code in the email, only include the dedicated Last Switch page-unlock passcode, and advise the recipient to delete the email after reading it.