Blog by Daniel Hauck. Sysadmin, Developer, Blogger.

TAG: wordpress

Simple WordPress Bash Backup Script

Hey Guys,

I needed to do some backups of multiple wordpress sites, so I decided to write a backup script especially for wordpress.

All you need is to call the script with two parametes, the first is the folder where your wordpress instance is installed, in my case /var/www/example.com.
The second is the folder where to backup it.

So for example:
./backup_wordpress /var/www/example.com /tmp/backup/example.com

That’s all, the script figures out how to connect to the database, creates a gzipped dump with timestamp, and creates a tar archive also with a timestamp.

You’ll find it in your specified folder under wp and db.

That’s it, have fun.

There are no more results.