Jump to content

Maintenance mode message


hafa
 Share

Recommended Posts

It sounds like you already know about the module for this: http://modules.processwire.com/modules/maintenance-mode/

I am not positive, but pretty sure this module wouldn't exist if there was an alternate way. If you're not familiar with modules yet, they are super easy to install, especially if you get the modules manager: http://modules.processwire.com/modules/modules-manager/

Once you have that, all other modules installs are just a couple of clicks and that's it :)

Link to comment
Share on other sites

You can put a checkbox on the home page, or a config page, and then something like this in the head.inc (adapt to your situation):

if($maintenance && $user->isGuest()) $session->redirect($page->get('/maintenance/'));

These tricks can also be tweaked to that effect http://processwire.com/talk/topic/2475-quick-tip-for-testing-on-live-website/

edit: adrian, in pw there is always an alternate way ;)

  • Like 2
Link to comment
Share on other sites

I stand corrected - good lesson for me there diogo :)

Very true though - that is what I love about PW - the way custom PHP is so easily implemented. All the flexibility of a fully custom coded site, with all the benefits of a CMS!

  • Like 2
Link to comment
Share on other sites

The whole idea of a maintenance mode is something to be careful with on a site that depends on any kind of search traffic. It's not a great idea to make a habit of it, that's for sure. So if you need to put a site in maintenance mode, try not to do it for long. :) Personally, I have never had the need for a maintenance mode. Though there have been a couple times where I was pushing in a major update to a site, and I temporarily added the following to the top of the /index.php file:

die("Go away! We are trying to upgrade the site."); 
  • Like 5
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...