Clear your Magento cache without using your admin pages

on July 28th, 2016 by Hades | No Comments »

While moving Magento installs or working on an existing clients install you might need to clean the cache, but you might not have access to the installs admin. With the code below you can easily clean the installs cache.

if($cache != null) {

Just copy it to a newly created document then run. Your installs cache has now been cleaned.

Alternately if you have shell access you can clear cache simply by using the command below:

rm -rf var/cache/*

Session cache can be cleared by SSH using the line below:

rm -rf var/session/*