Skip to content

Instantly share code, notes, and snippets.

@boombatower
Created January 25, 2011 06:51
Show Gist options
  • Save boombatower/794582 to your computer and use it in GitHub Desktop.
Save boombatower/794582 to your computer and use it in GitHub Desktop.
diff --git reinstall.php reinstall.php
new file mode 100644
--- /dev/null
+++ reinstall.php
@@ -0,0 +1,15 @@
+<?php
+define('DRUPAL_ROOT', getcwd());
+
+require_once DRUPAL_ROOT . '/includes/bootstrap.inc';
+$profile = array_pop(explode('/', conf_path()));
+try {
+ drupal_bootstrap(DRUPAL_BOOTSTRAP_DATABASE);
+ $tables = db_find_tables('%');
+ foreach ($tables as $table) {
+ db_drop_table($table);
+ }
+}
+catch (Exception $e) {
+}
+header('Location: install.php?profile=' . $profile . '&locale=en');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment