Skip to content

Commit 604281d

Browse files
committed
Update README with wp-env instructions
1 parent 891cc85 commit 604281d

File tree

1 file changed

+31
-8
lines changed

1 file changed

+31
-8
lines changed

README.md

Lines changed: 31 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,41 +21,64 @@ This repo is by no means perfect and should not been seen as an "official" way t
2121

2222
## Getting Started
2323

24-
If you'd like to play around with this custom block editor then:
24+
If you'd like to play around with this custom block editor then you have 2 options:
2525

26-
Clone this repo into the `plugins` directory of a WordPress installation.
26+
1. Use the WordPress Docker environment bundled with this Repo (provided via [`@wordpress/env`](https://developer.wordpress.org/block-editor/packages/packages-env/).
27+
2. Clone this repo directly into the `plugins` directory of a WordPress installation.
2728

28-
```bash
29-
// Change into your local WP install's Plugin directory.
30-
cd {{mylocalwp}}/wp-content/plugins/
29+
Either way you'll want to take the following steps:
3130

31+
### Clone Repo
32+
```bash
3233
// Clone this repo into that directory.
3334
git clone git@github.com:getdave/standalone-block-editor.git
35+
3436
```
3537

3638
Change into the cloned directory:
3739
```bash
3840
cd standalone-block-editor/
3941
```
4042

43+
### Install Dependencies
44+
4145
Install npm dependencies
4246
```bash
4347
npm install
4448
```
4549

46-
Build the Plugin:
50+
*Important*: check you have [the necessary prerequisites to run `wp-env`](https://developer.wordpress.org/block-editor/packages/packages-env/#prerequisites).
51+
52+
### Start the WordPress Environment (optional)
53+
54+
Start the environment (if using):
55+
56+
```bash
57+
npm run wp-env start
58+
```
59+
60+
You should now be able to login to WordPress at [`localhost:7575/wp-admin`](http://localhost:7575/wp-admin):
61+
62+
* `username`: `admin`
63+
* `password`: `password`
64+
65+
### Build the Plugin
66+
67+
Open a new terminal in the same [`standalone-block-editor/`] directory, then build the Plugin:
4768

4869
```bash
4970
npm run build
5071
```
5172

52-
...or alternatively to watch build automatically on file change:
73+
...or if you'd prefer to watch and build _automatically_ on file change run:
5374

5475
```bash
5576
npm run start
5677
```
5778

58-
**Activate the Plugin** from within WP Admin.
79+
### Activate the Plugin
80+
81+
Open the Plugins page within WPAdmin [`localhost:7575/wp-admin/plugins.php`](http://localhost:7575/wp-admin/plugins.php) and activate the `Standalone Block Editor Demo` Plugin.
5982

6083
## More Information
6184

0 commit comments

Comments
 (0)