Skip to content

Instantly share code, notes, and snippets.

@A5hleyRich
Last active July 4, 2016 15:17
Show Gist options
  • Save A5hleyRich/9a639d586b9e8ea9381c to your computer and use it in GitHub Desktop.
Save A5hleyRich/9a639d586b9e8ea9381c to your computer and use it in GitHub Desktop.
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