Website Maintenance / Coming Soon

Make your website offline while under maintenance or construction

The below steps can be used to will bring a website offline, displaying a message to the user instead of website content. The website can still be viewed by admin users when logged in, allowing for testing or construction.

Use Server Code to Display an Offline Message

The easiest way to make a website offline is to use the PHP server code of a design. Take the following steps to make the website offline using server code:

  1. Navigation to Dashboard > Website > Designs.
  2. Select the default website design to edit it.
  3. Clik the SRC button, and the PHP tab.
  4. Paste the below code into the server code, then click "Save Design" to save the changes.

<?php if (!(\Components\Settings\Administrators::currentIsAdministrator())){ die('This website is currently under construction.<br /> Click <a href="/admin/">here</a> to login if you have access'); } ?>


The message displayed to users can be altered by changing the quoted text on line four and five of the above server code. For example:

die('new message goes here');

Offline Message: Alternate Method

As an alternative to using PHP to make a website offline, you can also wrap the design (or parts of the website design) in a logic control, which will only display content to logged in admin users:

<logic:if test="\Components\Settings\Administrators::currentIsAdministrator()"> <p>Place content and design elements which will only be viewable to administrators here.</p> </logic:if> <logic:else> <h1 style="margin-top:50px; color:#BBB; text-align:center;">Website Under Development</h1> <p style="color:#BBB; text-align:center;">In the meantime, <a style="text-decoration:none; color:#555" href="#">click here</a> to view the our facebook page.</p> </logic:else>

Coming Soon Page

This method works well for websites under construction, or if you have the time to put together an effective "coming soon" page.

Create a coming soon page and coming soon design, and then re-direct all non-admin users to that page via PHP added to the default website design used by all other pages.

Administrators will still be able to view the website, with public users being re-directed to your coming soon page.

  1. Create a new coming soon design, and a coming soon page with your message.
  2. Edit the default website design, and click the SRC button, followed by the PHP tab.
  3. Paste the below code, and then click "Save Design" to save the changes.

<?php if (!(\Components\Settings\Administrators::currentIsAdministrator())){ \Framework\HTTP\Redirection::redirect('/coming-soon/'); } ?>

Note, you'll need to ensure that the page id in the above server code matches your new page.

Allowing Unsubscribe

In some cases, you may want to send e-mail marketing campaigns prior to the website being publicly visible. The issue with the above methods, is that users will be redirected away from the unsubscribe page / form.

You can allow users to access the unsubscribe page without being re-directed by adding some additional PHP:

<?php if (!(\Components\Settings\Administrators::currentIsAdministrator()) && !(\Components\Website\Pages::currentIsChildPageOf('/community/email/', true))) { die('This website is currently under construction.<br /> Click <a href="/admin/">here</a> to login if you have access'); } ?>


Or if you're using a logic control:

<logic:if test="(!(\Components\Settings\Administrators::currentIsAdministrator()) && !(\Components\Website\Pages::currentIsChildPageOf('/community/email/', true)))"> <p>Place content and design elements which will only be viewable to administrators here.</p> </logic:if> <logic:else> <h1 style="margin-top:50px; color:#BBB; text-align:center;">Website Under Development</h1> <p style="color:#BBB; text-align:center;">In the meantime, <a style="text-decoration:none; color:#555" href="#">click here</a> to view the our facebook page.</p> </logic:else>