Linux Remove all PHP files in all wp-content/upload folders

Handy tip to quickly remove all PHP files in all wp-content/uploads folders on your server.

A good first step after your server has been hacked via a WordPress plugin vulnerability.
cd /var/www/html

# first see what comes up
find . -path "*wp-content/uploads*" -name "*.php"

# if all looks good, execute same command with delete action
find . -path "*wp-content/uploads*" -name "*.php" -delete
Posted by
Snippet Viewed 4004 times.

Share your Linux code snippets:

  • Get some recognition & link back to your site.


Submit | Browse

Most Recent linux snippets

Most Viewed