10up/wpsnapshots

Name: wpsnapshots

Owner: 10up

Description: A project sharing tool for WordPress.

Created: 2017-09-09 04:22:58.0

Updated: 2018-01-16 21:00:27.0

Pushed: 2018-01-12 06:09:14.0

Homepage:

Size: 140

Language: PHP

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

WP Snapshots

WP Snapshots is a project sharing tool for WordPress. Operated via the command line, this tool empowers developers to easily push snapshots of projects into the cloud for sharing with team members. Team members can pull snapshots, either creating new WordPress development environments or into existing installs such that everything “just works”. No more downloading files, matching WordPress versions, SQL dumps, fixing table prefixes, running search/replace commands, etc. WP Snapshots even works with multisite.

How Does It Work?

WP Snapshots stores snapshots in a centralized repository (AWS). Users setup up WP Snapshots with their team's AWS credentials. Users can then push, pull, and search for snapshots. When a user pushes a snapshot, an instance of their current environment (wp-content/ , database, etc.) is pushed to Amazon and associated with a particular project slug. When a snapshot is pulled, files are pulled from the cloud either by creating a new WordPress install with the pulled database or by replacing wp-content/ and intelligently merging the database. WP Snapshots will ensure your local version of WordPress matches the snapshot.

Snapshot files (wp-content/) and WordPress database tables are stored in Amazon S3. General snapshot meta data is stored in Amazon DynamoDB.

Install

WP Snapshots is easiest to use as a global Composer package. It's highly recommended you run WP Snapshots from WITHIN your dev environment (inside VM or container). Assuming you have Composer/MySQL installed and SSH keys setup within GitHub/10up organiziation, do the following:

  1. Add the 10up/wpsnapshots repository as a global Composer repository:
    oser global config repositories.wpsnapshots vcs https://github.com/10up/wpsnapshots
    
  2. Install WP Snapshots as a global Composer package:
    oser global require 10up/wpsnapshots:dev-master -n
    
    If global Composer scripts are not in your path, add them:
rt PATH=~/.composer/vendor/bin:$PATH

If you are using VVV, add global Composer scripts to your path with this command:

rt PATH=~/.config/composer/vendor/bin:$PATH
Configure

WP Snapshots currently relies on AWS to store files and data. As such, you need to connect to a “repository” hosted on AWS:

If WP Snapshots has not been setup for your team/company, you'll need to create the WP Snapshots repository:

apshots create-repository

If a repository has already been created, this command will do nothing.

Usage

WP Snapshots revolves around pushing, pulling, and searching for snapshots. WP Snapshots can push any setup WordPress install. WP Snapshots can pull any snapshot regardless of whether WordPress is setup or not. If WordPress is not setup during a pull, WP Snapshots will guide you through setting it up.

Documentation for each operation is as follows:

Identity Access Management

WP Snapshots relies on AWS for access management. Each snapshot is associated with a project slug. Using AWS IAM, specific users can be restricted to specific projects.

Troubleshooting
Windows

WP Snapshots has been used successfully inside Windows Subsystem for Linux.


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.