Last active
April 5, 2024 18:00
-
-
Save emiliodallatorre/eca3df3b489e35d1eb0f2e51abfe9ec7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
rm -rf wp-includes | |
rm -rf wp-admin | |
wp core download --skip-content --force --allow-root | |
wp plugin install $(wp plugin list --field=name --allow-root) --force --allow-root | |
wp theme install $(wp theme list --field=name --allow-root) --force --allow-root | |
find wp-content/uploads -name "*.php" -delete | |
wget https://raw.githubusercontent.com/marcocesarato/PHP-Antimalware-Scanner/master/dist/scanner | |
php scanner . | |
rm scanner* | |
chown www-data:www-data -R * # Let Apache be owner | |
find . -type d -exec chmod 755 {} \; # Change directory permissions rwxr-xr-x | |
find . -type f -exec chmod 644 {} \; # Change file permissions rw-r--r-- | |
chown $USER:$USER -R . | |
chown www-data -R wp-content | |
# Path: wordpress_malware_remover.sh |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment