Drupal: How to Return Your Site to Online Mode
When you finish execution of technical works on your site (updating Drupal core, modules etc.) you should return your site to online mode to allow visitors working with it. Below you can read how to do this.
Solution
When site is online, all visitors are able to view site’s pages. In offline mode, only users with ‘administer site configurations’ permissions have access to the site; other visitors will see an adjustable message saying the site is temporary unavailable. Registered users can login to offline site through login page (example.com/user).
Alternatives
- Turn site on through web-interface
- Turn site on through settings.php file
- Turn site on with the help of SQL-request
Turn site on through web-interface
- Open the following page in your web-browser:
- Drupal 4: admin/settings
- Drupal 5: admin/settings/site-maintenance
- Drupal 6: admin/settings/site-maintenance
- Select “Online“
- Save your changes
Turn site on through settings.php file
- Open settings.php
- Uncomment $conf variable
- Add this element to array:
'site_offline'=>0
Turn site on with the help of SQL-request
Run the following SQL-request:
UPDATE variable SET value = ‘s:1:”0″;’ WHERE name= ‘site_offline';
DELETE FROM cache WHERE cid = ‘variables';