Wordpress-Backuper is a shell script by Max Base designed to create structured, compressed backups of a WordPress site-specifically focusing on core files, wp-content, and uploads by year.
- Zips the root directory (excluding .zip,.gz,.sql, etc.)
- Separately zips wp-content(excludinguploads)
- Scans uploads/for folders like2020,2021, etc., and zips each one independently
- Generates an others.zipfor non-year subdirectories inuploads
- Logs all actions to zip_process.log
- Supports dry-run and verbose modes
- Safe: skips zip files that already exist
- zip
- find
- Bash (Linux/macOS)
Install missing dependencies (Debian-based example):
sudo apt install zip findutilscurl -L -o wordpress-backuper.sh https://github.com/BaseMax/wordpress-backuper/raw/refs/heads/main/wordpress-backuper.sh
chmod +x wordpress-backuper.sh
./wordpress-backuper.shgit clone https://github.com/BaseMax/Wordpress-Backuper.git
cd Wordpress-Backuper./wordpress-backuper.sh| Option | Description | 
|---|---|
| -v | Verbose mode (print log live) | 
| -n | Dry-run (simulate, no zip) | 
| -h | Show help | 
./wordpress-backuper.sh -vAll zip files are saved in the root directory:
- root.zip— All root files except- wp-contentand known archive formats
- wp-content.zip— All content except- uploads/
- 2020.zip,- 2021.zip, ... — Individual zip files for each year in- uploads
- others.zip— Remaining contents of- uploads/excluding year folders
Log file:
- zip_process.log— Full log of the operation
.
├── index.php
├── wp-content/
│   └── uploads/
│       ├── 2021/
│       ├── 2022/
│       ├── other-dir/
After running the script, you’ll get:
root.zip
wp-content.zip
2021.zip
2022.zip
2....zip
others.zip
zip_process.log
Suggestions, issues, and pull requests are welcome via GitHub Issues.
- Developed by Max Base
- Script licensed under the MIT License