Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

General Questions

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Site Maintenance?


5 Posts   1371 Views


4 November 2010 at 4:15am Forum Moderator, 1796 Posts


When you upgrade a website (e.g. the version of silverstripe) do you do something like add an index.php in the root or change the htaccess temporarily to link to a static page indicating you are carrying out maintenance? Is there a simple way to do this with silverstripe?


4 November 2010 at 5:36am (Last edited: 4 November 2010 5:38am), Community Member, 82 Posts

I use this code in .htaccess file :

RewriteCond %{REQUEST_URI} !/maintenance.html$
RewriteCond %{REMOTE_HOST} !^91\.192\.248\.32 // your ip here
RewriteRule $ /maintenance.html [R=302,L]

I created a maintenance.html in the root folder, and put in my ip in the code above. Now all visitors are redirected to the maintenance page, and only me can access to the website.


4 November 2010 at 5:44am Forum Moderator, 1796 Posts

Many thanks that is the answer I was expecting :)


24 February 2011 at 8:58am Community Member, 37 Posts

I've used a similar tactic and it works well, but is a little clunkier to set up than I'd like.

There's also the Holding Page module:

Does anyone know if this module is suitable to be used while the SilverStripe core is being upgraded?


24 February 2011 at 8:24pm Forum Moderator, 5511 Posts

You shouldn't really upgrade the core on the live site. I also think relying on a module may not work as if core breaks then it'll bring all SilverStripe specific code down with it. You are best using your own maintanence.html file and .htaccess rule (as shown above) than a module.