Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Simple WordPress Backups
#!/bin/bash
cd /home/ashley/ashleyrich.com/public
# Backup database
wp db export ../backups/`date +%Y%m%d`_database.sql --add-drop-table
# Backup uploads directory
tar -zcf ../backups/`date +%Y%m%d`_uploads.tar.gz wp-content/uploads
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.