Drupal - Clear Cache without logging in
i. If you have drush installed (http://drupal.org/project/drush) — if you don't have it, think about that next time :), open up the console (WIN+R) in Windows or Ctrl+Alt+T in Linux point to your site folder (e.g. cd /www/mydrupalsite/
and type:
$ drush cc all
from the command line.
ii. Another method is to log into your phpmyadmin select your cache_ tables and flush/empty them.
The best solution I found in the end was to do it through phpmyadmin. I logged in and emptied any tables that had "cache" at the start of their name. Easy if you don't work in drush.
In addition to the options mentioned above, as a last ditch effort you could call the function drupal_flush_all_caches()
, to clear all caches.
You may do this by placing the code below in a php file in your document root and visiting it with a browser:
define('DRUPAL_ROOT', getcwd());
require_once DRUPAL_ROOT . '/includes/bootstrap.inc';
drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
drupal_flush_all_caches();
I have not tested this code, and make sure to remove it after you have cleared your caches.