27. Tools: backups, migration, maintenance and duplicator
Three tools that replace separate plugins: backups and migration (27.1), Maintenance mode / Coming soon (27.2) and the content duplicator (27.3). They belong to the administrator and aren’t part of the package: the AI doesn’t configure them (see the chapter 25 blocks).
In this chapter
- Backups and migrationScreen BuilderOS → Backups and migration (rail; with the rail off, top bar). Administrators only (manage_options); on multisite, only the super admin.
- Encrypted backupsEncrypted backups. New backups are stored encrypted, with the .bosz extension. The key doesn’t travel in the backup or in its database: it lives in…
27.2 Maintenance mode and Coming soon
A Settings card (option builder_os_maintenance) puts the site in one of three modes: off, Coming soon or Maintenance. Visitors see a default screen with an editable title and message, or a chosen WordPress page (page_id). The indicated roles (by default administrator and editor, bypass_roles) and anyone who opens the secret preview link (?bos_preview=<llave>, which stores the bos_preview_access cookie for 48 hours) pass through without seeing anything. An administrator can see the screen with ?bos_maintenance_preview=1.
- Headers.
- Coming soon:
200,X-Robots-Tag: noindex, nofollowand<meta name="robots" content="noindex, nofollow">on the default screen (the home page isn’t indexed). - Maintenance:
503,Retry-After: 3600,Cache-Control: no-storeand alsonoindex.
- Coming soon:
- Page cache.
- The
bos_preview_accesscookie is inbuilder_os_page_cache_cookies: a request with that cookie is never served from the cache or stored in it. - While the mode is active, no page is stored in the cache (
builder_os_page_cache_cacheablereturnsfalse, and the screen sendsDONOTCACHEPAGEandCache-Control: no-cache). - When the mode changes (from Settings or with any
update_option), the page cache is cleared, even if automatic clearing is off.
- The
- Preview key.
Builder_OS_Tools::settings()is read-only and generates nothing on each request. The key is created just once (ensure_key()) when the Settings card is opened or on save. With no stored key there’s no access through the secret link.
27.3 One-click duplicator
In the Pages, Posts, Theme templates (bos_template) and Popups (bos_popup) lists, the Duplicate row action appears. It creates a draft with the title «… (copy)», the same content, excerpt, parent and order, the terms of its taxonomies and the metadata (except locks, old dates and slugs, and the translation map), and notifies with a message on return. It requires permission to edit the original (edit_post) and an active license; the action carries a nonce per content item (admin-post.php?action=bos_duplicate_post).