https://github.com/basemax/wordpress-backuper
Wordpress-Backuper is a shell script designed to create structured, compressed backups of a WordPress site-specifically focusing on core files, wp-content, and uploads by year.
https://github.com/basemax/wordpress-backuper
backup backup-wordpress backup-wp bash sh tar targz wordpress wordpress-backup wp zip
Last synced: 2 months ago
JSON representation
Wordpress-Backuper is a shell script designed to create structured, compressed backups of a WordPress site-specifically focusing on core files, wp-content, and uploads by year.
- Host: GitHub
- URL: https://github.com/basemax/wordpress-backuper
- Owner: BaseMax
- License: mit
- Created: 2025-06-27T08:08:46.000Z (12 months ago)
- Default Branch: main
- Last Pushed: 2025-06-27T08:23:11.000Z (12 months ago)
- Last Synced: 2025-06-27T09:26:27.045Z (12 months ago)
- Topics: backup, backup-wordpress, backup-wp, bash, sh, tar, targz, wordpress, wordpress-backup, wp, zip
- Language: Shell
- Homepage:
- Size: 15.6 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ๐ฆ Wordpress Backuper
**Wordpress-Backuper** is a shell script by [Max Base](https://github.com/BaseMax) designed to create structured, compressed backups of a WordPress site-specifically focusing on core files, `wp-content`, and `uploads` by year.
---
## โ
Features
- Zips the root directory (excluding `.zip`, `.gz`, `.sql`, etc.)
- Separately zips `wp-content` (excluding `uploads`)
- Scans `uploads/` for folders like `2020`, `2021`, etc., and zips each one independently
- Generates an `others.zip` for non-year subdirectories in `uploads`
- Logs all actions to `zip_process.log`
- Supports dry-run and verbose modes
- Safe: skips zip files that already exist
---
## ๐งฐ Requirements
- `zip`
- `find`
- Bash (Linux/macOS)
Install missing dependencies (Debian-based example):
```bash
sudo apt install zip findutils
````
---
## ๐ Usage
### Quickly
```bash
curl -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.sh
```
### Clone the repo:
```bash
git clone https://github.com/BaseMax/Wordpress-Backuper.git
cd Wordpress-Backuper
```
### Run the script:
```bash
./wordpress-backuper.sh
```
### Options
| Option | Description |
| ------ | ----------------------------- |
| `-v` | Verbose mode (print log live) |
| `-n` | Dry-run (simulate, no zip) |
| `-h` | Show help |
### Example:
```bash
./wordpress-backuper.sh -v
```
---
## ๐ Output Files
All zip files are saved in the root directory:
* `root.zip` โ All root files except `wp-content` and 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
---
## ๐งช Example Directory Structure
```
.
โโโ 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
```
---
## ๐ฌ Feedback & Contributions
Suggestions, issues, and pull requests are welcome via [GitHub Issues](https://github.com/BaseMax/Wordpress-Backuper/issues).
---
## ๐ Credits
* Developed by [Max Base](https://github.com/BaseMax)
* Script licensed under the MIT License