Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
litespeed_wiki:cache:litemage:troubleshooting:turning-on-maintenance-mode [2016/05/06 14:22] Michael Alegre created |
litespeed_wiki:cache:litemage:troubleshooting:turning-on-maintenance-mode [2017/05/08 14:07] Lisa Clarke |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Turning On Maintenance Mode While LiteMage Is Enabled ====== | + | ~~NOTOC~~ |
+ | ======Site Abnormal After Store Maintenance with LiteMage Enabled====== | ||
- | If your Magento sites root directory, where index.php is located, contains a file named “maintenance.flag”, your Magento site is currently in [[https://www.siteground.com/tutorials/magento/maintenance-mode.htm|maintenance mode]] and should display a 503 error page. | + | ====Problem==== |
+ | Some Magento site ESI blocks show abnormal content after Magento store maintenance. | ||
- | However, if a page is currently cached, LSWS will serve the cached copy instead, as it won't reach the backend to know that the site is in maintenance mode. This is often undesirable as the cached versions of these pages may become invalidated during maintenance and anything involving the backend will not work. | + | ====Cause==== |
+ | The user forgot to disable LiteMage during store maintenance. During maintenance, the Magento site couldn't be accessed (a 503 error was returned) while LiteMage was still working. If any site page caches were refreshed during this period, the wrong content from backend would have been cached and would later be served erroneously. | ||
- | This leaves us with two possible scenarios: | + | ====Solution==== |
+ | Flush all LiteMage caches and rebuild the cache. Go to Magento Admin Panel, navigate to **System > Cache Management** and click **Flush All LiteMage Cache**. | ||
- | **1. You need to purge LiteMage Cache after maintenance**\\ | + | ====Notes==== |
+ | Please disable LiteMage during the store maitenance period, or use the following alternatives if your maintenance won't affect the site content: | ||
- | During maintenance, go to the Magento Admin Panel and navigate to System > Configuration > LITEMAGE CACHE > LiteMage Configuration, and set “Enable LiteMage Cache” to “No”. This will disable and automatically purge LiteMage Cache. Then, after removing the maintenance.flag file, re-enable LiteMage by changing “Enable LiteMage Cache” back to “Yes”. | + | During maintenance, add the following rewrite rule to the beginning of your .htaccess file to have all requests for /index.php redirected to /errors/503.php: |
- | + | ||
- | **2. You do not need to purge LiteMage Cache after maintenance**\\ | + | |
- | + | ||
- | During maintenance, add the following rewrite rule to the beginning of your “.htaccess” file to have all requests for /index.php redirected to /errors/503.php instead: | + | |
RewriteCond %{REQUEST_URI} !^/(media|skin|js)/ | RewriteCond %{REQUEST_URI} !^/(media|skin|js)/ | ||
Line 21: | Line 22: | ||
RewriteRule .* errors/503.php [L, E=Cache-Control:no-cache] | RewriteRule .* errors/503.php [L, E=Cache-Control:no-cache] | ||
- | Once maintenance has been completed, either remove or comment out this rewrite rule to restore your site back to it’s normal state. | + | Once maintenance has been completed, either remove or comment out this rewrite rule to restore your site back to it’s normal state. In this way you can avoid the purge of the LiteMage cache and the cost to rebuild it. |