Magento SSH maintenance

Posted by | Reference | No Comments
  • 0
  • July 29, 2013

What’s this all about? Well there’s various forum posts and great tips out there for maintaining your Magento installs. I’ve collated some of these together below for my own purposes and ease of access:

rm -rf downloader/pearlib/cache/*
rm -rf downloader/pearlib/download/*
rm -rf var/cache/*
rm -rf var/session/*
rm -rf var/report/*
rm -rf var/tmp/*

TRUNCATE log_customer;
TRUNCATE log_quote;
TRUNCATE log_summary;
TRUNCATE log_summary_type;
TRUNCATE log_url;
TRUNCATE log_url_info;
TRUNCATE log_visitor;
TRUNCATE log_visitor_info;
TRUNCATE log_visitor_online;
TRUNCATE report_event;
TRUNCATE catalogsearch_fulltext;
TRUNCATE catalogsearch_query;
TRUNCATE catalog_compare_item;

chmod -R 777 lib/PEAR
./pear mage-setup
./pear upgrade -f magento-core/Mage_All_Latest-stable
chmod 550 ./mage
./mage mage-setup .
./mage sync
./mage list-upgrades
./mage config-set preferred_state stable
./mage upgrade-all --force

find . -type f -exec chmod 644 {} \;
find . -type d -exec chmod 755 {} \;

php -f index.php

About john

Likes mountains when not engaged in utter nerdoid activity! Motorsport, the sea, caterpillars. Fish. Other things. When nerding it up - interested in data and information structures, applying simple yet effective solutions; does gold plate always deliver?, frontend technologies. Webby stuff kinda gets involved with those things.