Most Magento installations will be on a VPS or Dedicated server with access to the command line, via a tool like putty. This is the easiest and fastest way to both clear the cache and reset file permissions in Magento.
Warning: Be careful when using these tools. If you run them on the wrong folder you can Internal Server Error your whole server!
If you don’t have putty access to the server where Magento is installed:
- Download the Magento Cleanup Tool from Magento’s website
- Unzip the file to your local computer and then using FTP access to your website, upload the file magento-cleanup.php to the root folder where your Magento installation is located.
- In a browser type: http://www.yourdomain.com.au/magento-cleanup.php
If your Magento installation is in a subfolder of your website you will need to put this in to the above url as well as appropriate.
The rest of these instructions assume you have command line access to your server.
Reset file permissions
Log into your server using putty. Change to the directory where your Magento installation is located (to make sure you don’t run this command on the wrong folder!)
Run these commands, one at a time:
find . -type f -exec chmod 644 {} \;
find . -type d -exec chmod 755 {} \;
chmod 550 pear
Quick clear of the cache
After following the above commands you will already be in the folder where your Magento installation is located. Then run the following command
rm -rf var/cache/*
Make sure you ahve changed to the right directory first or you could delete mass parts of your Magento installation rendering your whole install useless!