Friday, August 13, 2010

How to log in once you have turned your site off-line offline mode for maintenance

How to log in once you have turned your site off-line offline mode for maintenance
Drupal 4.7.x · Drupal 5.x · Drupal 6.xLast modified: May 30, 2009 - 07:53
Once you have turned your site off-line using admin » settings » site maintenance(admin/settings), you can log back in by visiting:


http://example.com/?q=user

Note: Use the literal word user, not your username or user id. Do, however, replace example.com with the proper URL parts pointing to your website.

You need to enter the username and password of an account with permission to administer site configuration. User 1 has this ability as a safety net, should you not have this turned on in other administrator account(s).

If you attempted to log in with a username that does not have the "administer site configuration" permission you will be stuck in that user account until you clear the browser's cookies. Simply instruct your browser to delete cookies for the site and visit the referenced URL above again. You can also use another browser to access the URL.

To return the site to online mode visit the following page:

Drupal 4: administer » settings (admin/settings)
Drupal 5&6: Administer » Site configuration » Site maintenance (?q=admin/settings/site-maintenance).

http://example.com/?q=admin/settings/site-maintenance

On the page, set Site status to Online.

If you are truly desperate you can try the following database queries to restore access:


UPDATE variable SET value = 's:1:"0";' WHERE name= 'site_offline';
DELETE FROM cache WHERE cid = 'variables';

1 comment:

Anonymous said...

Thanks, This was a life saver.