![]() ![]() First you should cd into the correct directory so that you are within the Drupal directory. If you are using a multi site installation cd into the correct sites/sitename directory or specify the correct -l setting In Drupal 6 only this command is actually required: $ drush vset --yes site_offline 1; Also in Drupal 6 you can use the following commands if you wish to specify a message to show to the users of the site whilst it is down. $ drush vset --yes site_offline_message 'This site is being maintained'; $ drush vset --yes site_offline 1; In Drupal 7 use following command to put the site into maintenance mode: $ drush vset --yes maintenance_mode 1; To set an a specific message use: $ drush variable-set --yes maintenance_mode_message 'This site is being maintained' It could be necessary to clear caches that the changes of these variables take effect: $ drush cc all. ![]() Theming the maintenance page If you wish to display a custom template when your site is in maintenance mode, or in the event of a database failure, you can do so by working with the maintenance page functionality. The system includes a default template, located at /modules/system/maintenance-page.tpl.php. To set up your custom maintenance page, there are two steps: First, override the default template file by copying it into your active theme directory. Second, you must also modify your settings.php file to instruct the system to display the template. You can do this by enabling the $conf variable and adding the internal name of your theme, like this. ![]() How to change my maintenance page? Make the changes in new maintenance template file. Clear the Drupal cache. If you want how to Put Drupal 7 in Maintenance. An alternate template file of maintenance-page--offline.tpl.php can be used when the database is offline to hide errors. Search Drupal 7.x. Function, class.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
April 2018
Categories |