Skip to content
Corex

Coming soon mode

Coming soon is one of the CoreX operations modes. While it is on, visitors get one page — the coming-soon page, at the home URL — and the people building the site get the site. Examples use the neutral Acme placeholder.

It is not Maintenance mode. Maintenance answers every visitor with a 503 and a fixed CoreX notice, which suits an outage measured in minutes. Coming soon answers 200 with a page the theme owns, which suits the weeks before a launch.

Who is askingThe home URLAny other address
A visitor, signed outThe coming-soon page, 200A temporary redirect (302) to the home URL
Signed in, cannot edit postsSame as a visitorSame as a visitor
Signed in, can edit posts (edit_posts)The real siteThe real site
A browser that opened the preview linkThe real siteThe real site

The admin, the login page, the REST API, AJAX and cron are never intercepted. robots.txt and /favicon.ico are served as they always are, and the sitemap lists the home URL and nothing else.

Open CoreX → Operations & Security → Environment & Maintenance, choose Coming soon, tick the acknowledgement, and apply. To launch, choose Production and type PRODUCTION.

From the command line:

Terminal window
wp corex mode get
wp corex mode set coming-soon --acknowledge --user=<login>
wp corex mode set production --phrase=PRODUCTION --user=<login>

The command follows the screen’s rules: without the confirmation its mode needs, nothing changes and it exits with status 1.

Anybody who can edit posts sees a bar on every front-end page — “Coming soon is on. Visitors see the coming-soon page, not this site.” — with a link to view the page as a visitor does, and, for somebody who can change the mode, a link to Operations & Security. It cannot be dismissed. In the admin the same message is in the toolbar.

For a client’s stakeholders, who need to see the site and should not need an account.

On the same screen, Create preview link. The link is shown once, on the page that follows, in a field with a Copy link button; CoreX does not keep it. With scripts off there is no button, and the link is copied from the field by hand. Whoever opens it is served the real site in that browser for 14 days, with a banner saying it is a private preview. It gives no access to the admin.

You do thisWhat happens
Regenerate linkA new link, shown once. The old one stops working at its holders’ next request.
Revoke linkNo link. Every browser that used it is a visitor again at its next request.
Leave Coming soonThe link is removed. Coming back later starts with no link.

Each of the three is recorded in the history with your name, and never the link.

The page is a block template named coming-soon.

  • CoreX registers a default, which applies under any block theme.
  • A theme replaces it with templates/coming-soon.html. wp corex make:site generates that file in every new client theme, so the page is in the client’s repository from the first day.
  • Either can be edited in the Site Editor.
  • A theme with no block templates gets a self-contained CoreX page, with a 200.

Give it no header or footer part: every link in one would be redirected straight back to the page.

Load the page’s own stylesheet and fonts on corex_coming_soon_enqueue_assets, which fires only when the coming-soon page is the response:

add_action('corex_coming_soon_enqueue_assets', static function (): void {
wp_enqueue_style(
'acme-coming-soon',
get_stylesheet_directory_uri() . '/assets/css/coming-soon.css',
[],
wp_get_theme()->get('Version'),
);
});

The page’s <body> carries corex-coming-soon, and no other page does.

To let one more address through — a privacy policy linked from the page — return true from corex_coming_soon_bypass in the client’s plugin:

add_filter('corex_coming_soon_bypass', static function (bool $allowed): bool {
return $allowed || is_page('privacy-policy');
});

On a multilingual site, name each language’s home with corex_coming_soon_is_home, which receives the answer so far and the request path.

The page is indexable. To keep it out of search results until launch, use WordPress’s own Settings → Reading → Discourage search engines from indexing this site; the page then carries WordPress’s noindex and no sitemap is published.