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 2235 times.

Share your Linux code snippets:

  • Get some recognition & a link back to your site.
  • Create your own code library.
  • Help your fellow developers, as they have helped you.

 

Submit | Browse

Most Recent linux snippets

Most Viewed