How to Make Auto-Backup for WordPress

May 3, 2017


CentOS 7.3.1611 (Using VPS)



1.Make Shell Script

1-1. Make directory for backup


1-2. Make Shell Script

In this Shell Script, all commands for backup are excuted.

In Detail:
1. Backup DB(DBname:dbname)
2. Backup wp-content
3. Save it to /_backup/[date].zip
4. Remove backup made a week ago.


1-3. Test it manually

If succeeded, [date].zip is made in /_backup directory


2.Register Shell Script with CRON

2-1. Register

To excute automatically, set it to CRON.

In Detail:
Excute at 1 a.m. every Tue, Sat