Skip to content

Commit

Permalink
Merge pull request #1283 from versionpress/1263-pre-4.0beta-polish
Browse files Browse the repository at this point in the history
Pre 4.0-beta polish
  • Loading branch information
borekb committed Jul 9, 2017
2 parents 5c99bc3 + f2edbbe commit 9671af8
Show file tree
Hide file tree
Showing 6 changed files with 3,555 additions and 1,200 deletions.
30 changes: 16 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
# VersionPress

Git-based version control plugin for WordPress. Undo any change, branch & merge easily, migrate database content between environments and more. <https://versionpress.net/>
Combining the best of both worlds, VersionPress is a user-friendly versioning solution for WordPress powered by Git. You can:

- See history of your site
- Undo anything, incl. database changes
- Roll back to previous states
- Create safe staging environments: `wp vp clone --name=staging`
- Merge databases: `wp vp pull --from=staging`
- Push to GitHub or implement any workflow you like

![image](https://user-images.githubusercontent.com/101152/27992357-15600e14-6493-11e7-8e19-1e85c858a1b8.png)

[![Gitter](https://img.shields.io/gitter/room/nwjs/nw.js.svg)](https://gitter.im/versionpress/versionpress)

Expand All @@ -14,35 +23,28 @@ VersionPress is young 🐣. It works fine on simpler sites and you're encouraged
To **use** VersionPress:

1. Make sure you understand the [Developer Preview project status](https://docs.versionpress.net/en/getting-started/about-eap).
2. Download the latest version from [GitHub releases](https://github.com/versionpress/versionpress/releases). **It must be the built ZIP**, e.g., `versionpress-3.0.zip`, not the source codes ZIP!
2. Download the latest version from [GitHub releases](https://github.com/versionpress/versionpress/releases).
3. Install to your WordPress site.
4. Read the [quick start tutorial](https://blog.versionpress.net/2015/05/versionpress-1-0-walkthrough/) and [part 2 on staging](https://blog.versionpress.net/2015/09/versionpress-2-0-staging/).
5. Enjoy!


To **develop** VersionPress:

1. Make sure you have tools like Git, NPM, Composer, WP-CLI etc. installed, see [Dev-Setup.md](./docs/Dev-Setup.md).
2. Clone this repo.
3. Run `npm install`.
1. Set up your development environment as per [Dev-Setup.md](./docs/Dev-Setup.md).
2. Send pull requests.

See [CONTRIBUTING.md](./CONTRIBUTING.md) for more.


## Useful resources

- <https://versionpress.net/>
- Homepage: <https://versionpress.net/>
- [User documentation](https://docs.versionpress.net/)
- [Blog](https://blog.versionpress.net/)
- [Support repo](https://github.com/versionpress/support)
- Support repo: [`versionpress/support`](https://github.com/versionpress/support)


## Contributing

There are many ways to contribute:

- Developers, we'd love [your help](./CONTRIBUTING.md).
- Good at writing? Help maintain [the docs](https://github.com/versionpress/docs).
- Found a bug? [File an issue](https://github.com/versionpress/versionpress/issues).

See [CONTRIBUTING.md](./CONTRIBUTING.md) for more. Thank you!
Please see [CONTRIBUTING.md](./CONTRIBUTING.md), thank you!
4 changes: 2 additions & 2 deletions dev-env/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
FROM wordpress:php5.6
FROM wordpress:4.8-php5.6-apache

# Requirements for WP-CLI & VersionPress (separate lines to make it clear)
RUN apt-get update \
&& apt-get install -y sudo less mysql-client \
&& apt-get install -y git \
&& rm -rf /var/lib/apt/lists/*

# Install WP-CLI
# Install WP-CLI
RUN curl -o /bin/wp-cli.phar https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar
RUN { \
echo '#!/bin/sh'; \
Expand Down
24 changes: 8 additions & 16 deletions docs/Dev-Setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,15 @@

This will set you up for VersionPress development.

## Introduction

While VersionPress ships as a WordPress plugin, it is a relatively large piece of software where good development tools and workflows are necessary. We try to provide as much as possible out of the box, relying on this general approach:

- You should use **local tools** and their power to **write** code. Specifically, we recommend PhpStorm.
- **Runtime** is handled by **Docker**. For example, you do not need a local WordPress site or a MySQL server, all runs as Docker containers.

> **Note**: If you still need to use the legacy approach where the entire setup was local, refer to the the `4.0-alpha1` tag of the documents [Dev-Setup.md](https://github.com/versionpress/versionpress/blob/4.0-alpha1/docs/Dev-Setup.md) and [Testing.md](https://github.com/versionpress/versionpress/blob/4.0-alpha1/docs/Testing.md).
> **Note**: Since 4.0-beta, we rely on Docker which makes things much easier than full local setup. The legacy approach is still documented in [Dev-Setup.md@4.0-alpha1](https://github.com/versionpress/versionpress/blob/4.0-alpha1/docs/Dev-Setup.md) and [Testing.md@4.0-alpha1](https://github.com/versionpress/versionpress/blob/4.0-alpha1/docs/Testing.md).
## Getting started

Install:

- PHP 5.6+ and Composer
- PHP 5.6+ and Composer 1.4+
- Git 2.10+
- Node.js 8.1+, npm 5+
- Node.js 8.1+, npm 5.1+
- Docker 17+

Then run:
Expand All @@ -26,17 +19,16 @@ Then run:
2. `npm install`
3. `npm start`

You can now log in to a WordPress site at `http://localhost:8088`, username `admin`, password `adminpwd` (all this can be changed via `docker-compose.yml`).
Wait for all the things to download and build (☕), then log into the test site at `http://localhost:8088`, username `admin`, password `adminpwd` (see `docker-compose.yml`) and activate VersionPress on the _Plugins_ page. You're now all set up! 🎉

![image](https://cloud.githubusercontent.com/assets/101152/26283542/17fccd8a-3e2b-11e7-9881-a26fbb49d144.png)

This leaves you with this working environment:
Some useful things about your development environment:

- VersionPress source files are mapped to container's `wp-content/plugins/versionpress` so any changes you make locally are immediately reflected in the test site.
- The React `./frontend` app requires a build, see below.
- Database can be inspected at `http://localhost:8099`, server name: `db`, username: `root`, password: `r00tpwd`.
- VersionPress source files are directly mapped to the site's `wp-content/plugins/versionpress` so any changes you make locally are immediately live.
- Database can be inspected using [Adminer](https://www.adminer.org/) at `http://localhost:8099`, server name: `db`, username: `root`, password: `r00tpwd`.
- You can also use tools like MySQL Workbench or `mysql` command-line client on port 3399, e.g., `mysql --port=3399 -u root -p`.
- WordPress site is mapped to `./dev-env/wp` where you can inspect the files and Git history using your favorite tools.
- WordPress site's web root is mapped to `./dev-env/wp` so you can e.g. use your local Git client to inspect the history.
- To invoke things like WP-CLI in the context of a test WordPress site, you have these options:
- SSH into container the container: `docker-compose exec wordpress /bin/bash`
- Use `docker-compose exec wordpress <command>`, for example:
Expand Down

0 comments on commit 9671af8

Please sign in to comment.