hafa Posted April 12, 2013 Share Posted April 12, 2013 Hey guys, Is there any way to put a site into maintenance mode directly from the cp without a plugin? Cheers, Hafa Link to comment Share on other sites More sharing options...
adrian Posted April 12, 2013 Share Posted April 12, 2013 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 More sharing options...
diogo Posted April 12, 2013 Share Posted April 12, 2013 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 2 Link to comment Share on other sites More sharing options...
adrian Posted April 12, 2013 Share Posted April 12, 2013 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! 2 Link to comment Share on other sites More sharing options...
ryan Posted April 13, 2013 Share Posted April 13, 2013 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."); 5 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now