Skip to content

Instantly share code, notes, and snippets.

@lukaswhite
Created February 17, 2015 18:06
Show Gist options
  • Save lukaswhite/3d087c3c2605f21507a5 to your computer and use it in GitHub Desktop.
Save lukaswhite/3d087c3c2605f21507a5 to your computer and use it in GitHub Desktop.
Flush Drupal 7's cache, when all you have is FTP (!) access.
<?php
error_reporting(-1);
ini_set('display_errors', 'On');
define('DRUPAL_ROOT', getcwd());
require_once DRUPAL_ROOT . '/includes/bootstrap.inc';
drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
drupal_flush_all_caches();
print 'All caches cleared';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment