Skip to content

jdedwards3/wpbackup

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

WordPress backup

Usage

First make the script executable:

chmod +x ./wpbackup

Then use it like this:

./wpbackup -u user -h host -f folder

This script uses the WP CLI, and does not require that WP CLI is installed on your local computer. It does require that WP CLI is installed on the remote host.

This script will attempt to find a WordPress installation based on the specified folder.

If WordPress is found, maintenance mode will be activated. The site folder will then be archived and compressed into a file with the pattern:

backup_${timestamp}_${folder}.tar.gz

Then the WordPress database will be exported saved as a compressed file with the pattern:

backup_${stamp}_${folder}-db.sql.gz

Maintenance mode will then be deactivated.

Both the files and database are saved to the local computer where this script is run, not the remote host.

About

backup WordPress files and database

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages