This blog post is intended to explore the importance of routine Magento maintenance. Keeping your Magento store clean and maintained is an important step to ensuring that your store performs as optimally as it can regardless of the platform you host it on. This also ensures that, should something happen with your store, you are well equipped to handle it. Below are some simple tasks you can take to make sure you are getting the most out of your Magento store. These tasks are available in your Magento administration panel under System-> Configuration -> Advanced -> System. For these tasks to work, you must have your Magento Cron set to run. For instructions on how to do this, please see our previous blog post on enabling the Magento Cron.
Magento 1.4 and newer allows the ability to set your site in “maintenance mode” by creating a blank ‘maintenance.flag’ file in the document root of your webserver (public_html). This is ideal if you need to take the public site offline for developmental changes. The downside to doing this is that you also lose access to the site, which can make checking site changes difficult. By slightly modifying the index.php code, we can change this behavior to maintain access to the site for certain IP addresses. This would allow the site developer, for example, to maintain access while presenting the maintenance page to all other visitors.
Sometimes a Magento module may break the frontend and/or backend of the site. When this happens, you will not be able to disable the module from the Magento admin area. Fortunately, it is not only possible but also fairly easy to manually disable the extension or module in question to restore site functionality.
As your customers browse through your Magento store, Magento will often write various information to disk in an effort to present a smoother, more pleasant experience to the end user. These objects are often various core systems, popular PHP calls and various other blocks of information that the Magento system gets requests for many times over from the customer. It’s much faster for Magento to store these requests in a caching system on the drive than have to rebuild the information with every single request.
However, drive access times are a major bottleneck in server resources. While retrieving from cache is certainly faster than processing the request from code, accessing the drive is slower than other storage mediums available to a web server… namely, RAM.
Magento provides built-in support to run certain tasks on a scheduled basis through cron. Cron is a task scheduler for Unix-like systems. Since Magento 1.3.0, the following features can be scheduled through the cron system:
* Automatic Currency Rate Updates
* Catalog Price Rules
* Customer Alerts and Notifications
* Database Log Cleanup and Maintenance
* Generating and Updating Google Sitemaps
* Newsletter Mail-mailing
Two key configuration changes are required to run these scheduled tasks. First, the task must be enabled in Magento’s XML configuration. Second, the Magento cron.php script must be configured to run via the system crontab.