This Python script automates the process of cleaning up a pirated WordPress site by reinstalling a fresh version of WordPress along with essential plugins, and removing malicious .php files from the uploads directory.
- Backup Creation: Allows creating a backup of the WordPress directory before making changes.
- Deletion of Unnecessary Files and Directories: Deletes unnecessary files and directories, excluding essential WordPress files.
- Reinstallation of WordPress: Downloads the latest version of WordPress and reinstalls it in the specified directory, ensuring a clean and legitimate installation.
- Fresh Plugin Installation: Fetches URLs for essential plugins and installs them, ensuring the site has necessary functionality without compromise.
- Removal of Malicious PHP Files: Deletes malicious .php files found within the uploads directory, enhancing the security and integrity of the WordPress site.
- Python 3.x
curl
command-line tooltar
command-line toolunzip
command-line tool
- Clone the repository to your local machine:
git clone https://github.com/abidarm/clean-wordpress-site.git
- Navigate to the cloned directory:
cd clean-wordpress-site
- Execute the script providing the starting directory of your WordPress installation as an argument:
python script.py /path/to/your/wordpress
Replace /path/to/your/wordpress with the absolute path to your WordPress installation directory.
This script performs operations that could potentially modify or delete files and directories in your WordPress installation. Use it at your own risk.