https://github.com/vccw-team/wp-cli-vackup
This is a WP-CLI based backup solution for WordPress.
https://github.com/vccw-team/wp-cli-vackup
backup backup-solution wordpress wp-cli
Last synced: 5 months ago
JSON representation
This is a WP-CLI based backup solution for WordPress.
- Host: GitHub
- URL: https://github.com/vccw-team/wp-cli-vackup
- Owner: vccw-team
- Created: 2017-01-04T06:20:40.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2017-11-01T11:59:17.000Z (over 8 years ago)
- Last Synced: 2025-04-08T18:21:29.184Z (10 months ago)
- Topics: backup, backup-solution, wordpress, wp-cli
- Language: PHP
- Size: 53.7 KB
- Stars: 9
- Watchers: 4
- Forks: 2
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- Contributing: .github/CONTRIBUTING.md
Awesome Lists containing this project
README
# wp vackup
[](https://travis-ci.org/vccw-team/wp-cli-vackup)
This is a WP-CLI based backup solution for WordPress. You can create backups of the files and the DB, and restore the sites back from them.
With the alias function of the WP CLI, this command helps you to reduce workload on managing multiple sites.
```
$ wp @all vackup create
```
See more about alias: https://make.wordpress.org/cli/handbook/config/#config-files
## Requires
* WP-CLI 0.23 or later
## Getting Started
```bash
$ mkdir -p ~/.wp-cli/commands && cd -
$ git clone git@github.com:vccw-team/wp-cli-vackup.git
```
Add following into your `~/.wp-cli/config.yml`.
```yaml
require:
- commands/wp-cli-vackup/cli.php
```
## Configuration
You can configure the default directory to store backups.
```
vackup:
dir: /Users/miya0001/backups
```
See more about configuration: https://make.wordpress.org/cli/handbook/config/
## Subcommands
* `wp vackup create`: Create a .zip archive from WordPress. It contains files and database.
* `wp vackup restore`: Restore the WordPress site from a .zip archive.
* `wp vackup server`: Launch a temporary WordPress site with PHP built-in web server.
### Backup your WordPress files and database.
The file name of the archive will be generated from `home_url()` and a timestamp.
```bash
$ wp vackup create --dir=path/to/dir
```
The archive file name will be `path/to/dir/example.com-20170101000000.zip`.
### Restore from backup.
```bash
$ wp vackup restore
```
You'd sometimes need `wp search-replace`, for example when you create a backup from production and restore it to dev environment.
### Launch WordPress from backup with PHP built-in server.
```
$ wp vackup server /path/to/backup.zip
```
Then visit [http://localhost:8080/](http://localhost:8080/).
### Usage
```bash
NAME
wp vackup
DESCRIPTION
CLI based backup solution for WordPress
SYNOPSIS
wp vackup
SUBCOMMANDS
create Create a `.zip` archive of a WordPress install.
restore Restore the WordPress site from backup.
server Launch WordPress from backup file with PHP built-in web server.
```
## Upgrade
```
$ wp package update
```