
WordOps-Backup: The Script I Wish I Had When My WordPress Site Needed Saving
Let’s be honest-if you’ve ever managed a WordPress site, you know the anxiety of “what if my server crashes tomorrow?” I’ve been there. More than once. That’s exactly why I built WordOps-Backup: to take the pain, panic, and finger-crossing out of WordPress backups for anyone using WordOps.
This isn’t just another backup script. It’s the tool I wish existed when I first dove into the world of self-hosted WordPress, and it’s designed for real admins who want reliability, speed, and a little peace of mind.
The Problem: WordPress Backups Are Often a Mess
Let me set the scene. You’ve got a WordPress site humming along on a shiny WordOps stack. Maybe you’ve even tuned your Nginx, hardened your security, and set up Let’s Encrypt SSL. But then you realize:
- Your backups are scattered (or worse, non-existent)
- Manual backups eat up your time and sanity
- Most scripts don’t handle incremental backups or notifications
- When disaster strikes, you’re left sifting through half-baked tarballs and old SQL dumps
I hit this wall myself. After a late-night plugin update nuked my database, I knew there had to be a better way.
Why WordOps? (And Why It Deserves a Smarter Backup Tool)
WordOps is a command-line tool that makes deploying and managing WordPress on Nginx almost fun. With a few keystrokes, you get a high-performance stack:
- Nginx, PHP, MariaDB, Redis, WP-CLI, and more
- Automated SSL, kernel optimizations, and security hardening
- Super-fast caching and easy monitoring
- Simple commands for installing, updating, and removing sites
But even with all that power, backup and restore are left up to you. That’s where WordOps-Backup comes in.
Building WordOps-Backup: The Features I Needed (and You Probably Do Too)
I wanted a backup solution that felt like a natural extension of WordOps-fast, flexible, and friendly. Here’s what I built:
1. Multiple Backup Types
- Full backups: Everything-files and database, zipped up tight
- Database-only: For when you just want the essentials
- Incremental: Only changed files since the last full backup, saving space and time
2. Advanced Compression
- zstd: Lightning-fast and efficient, for those who want speed and small files
- pigz: Parallel gzip for multicore systems, because time is money
3. Backup Management
- Retention policies: Set how long to keep old backups-no more filling up your disk
- Automatic cleanup: Out with the old, in with the new, all on autopilot
- Scheduling: Cron integration and an interactive menu for “set it and forget it”
4. Notifications That Actually Work
- Telegram: Get instant pings when your backup finishes (or fails)
- Email (SMTP): Full logs and status updates in your inbox
- ntfy: Push notifications for the modern admin
5. User Experience
- Interactive menu: For those who hate memorizing commands
- CLI options: For automation geeks and scripting wizards
- Detailed logging: See exactly what happened, when, and why
How to Use WordOps-Backup (A Quickstart for the Eager)
1. Clone and Configure
git clone https://github.com/mayur-chavhan/WordOps-Backup.git
cd WordOps-Backup
chmod +x wordpress-backup.sh
Edit the variables at the top of the script to match your setup-choose your backup directory, retention days, compression type, and notification preferences.
2. Run in Interactive Mode
./wordpress-backup.sh
You’ll get a menu with options for full, database-only, or incremental backups, scheduling, cleanup, and more.
3. Or Use Command-Line Mode
./wordpress-backup.sh --full yourdomain.com
./wordpress-backup.sh --db yourdomain.com
./wordpress-backup.sh --incremental yourdomain.com
Perfect for cron jobs or integrating into your own scripts.
4. Set Up Notifications
- For Telegram, create a bot and grab your chat ID
- For email, plug in your SMTP details
- For ntfy, pick your topic and server
5. Schedule Automatic Backups
Add cron jobs for daily, weekly, or custom schedules. Example:
0 2 * * * /path/to/wordpress-backup.sh --full example.com
Why This Script Actually Makes WordPress Backups Easy
Let’s be real: most backup scripts are either too simple (missing features you need) or too complex (requiring a PhD to configure). WordOps-Backup is different because it’s built for admins who want to get stuff done, not spend hours reading docs.
- Incremental backups mean you’re not wasting bandwidth or disk space
- Compression options let you trade off speed and size as needed
- Notifications keep you in the loop, so you’re never left guessing
- Retention and cleanup mean you won’t wake up to a full disk and a crashed site
- It’s open source and customizable-add your own tweaks, or contribute back
What’s Next? (And How You Can Make It Even Better)
WordOps-Backup is designed to grow with you. Want to add new notification channels? Tweak the backup structure? It’s all possible. Fork it, hack it, and share your improvements.
If you’re running WordPress on WordOps and you care about your data, give this script a spin. Your future self (and your clients) will thank you.