Linux Delete all PHP files in a folder recursively

This is handy when your WordPress instance has been hacked. A typical hack includes uploading random PHP files in your site's wp-content/uploads folder.

Use this command inside the wp-content/uploads folder to remove all PHP files within.
find . -name "*.php" -type f -delete
Posted by
Snippet Viewed 8287 times.

Share your Linux code snippets:

  • Get some recognition & link back to your site.


Submit | Browse

Most Recent linux snippets

Most Viewed