Skip to content

Commit

Permalink
Getting Started Docs: Update to use
Browse files Browse the repository at this point in the history
  • Loading branch information
ockham committed Feb 10, 2020
1 parent 30b837a commit 83ef9cb
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 16 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ This repo is the development hub for the <a href="https://make.wordpress.org/cor
- **Download:** If you want to use the latest release with your WordPress site, <a href="https://wordpress.org/plugins/gutenberg/">download the latest release from the WordPress.org plugins repository</a>.
- **Discuss:** Conversations and discussions take place in <a href="https://wordpress.slack.com/messages/C02QB2JS7">`#core-editor` channel on the Making WordPress Slack</a>.
- **Contribute:** Development of Gutenberg happens in this GitHub repo. Get started by <a href="https://github.com/WordPress/gutenberg/blob/master/CONTRIBUTING.md">reading the contributing guidelines</a>.
- **Develop:** Just want to run Gutenberg locally to tinker with it? See <a href="https://github.com/WordPress/gutenberg/blob/master/docs/contributors/getting-started.md">Getting Started</a>.
- **Learn:** <a href="https://wordpress.org/gutenberg/">Discover more about the project on WordPress.org</a>.

**Gutenberg is more than an editor.** While the project is currently focused on building the new editor for WordPress, it doesn't end there. This lays the groundwork for a new model for WordPress Core that will ultimately impact the entire publishing experience of the platform.
Expand Down
23 changes: 7 additions & 16 deletions docs/contributors/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,7 @@ If you don't have a local WordPress environment to load Gutenberg in, we can hel

### Step 1: Installing a Local Environment

#### Quickest Method: Using Docker

The quickest way to get up and running is to use the provided Docker setup. If you don't already have it, you'll need to install Docker and Docker Compose.
The quickest way to get up and running is to use the [`wp-env` command](https://github.com/WordPress/gutenberg/tree/master/packages/env), which is developed within the Gutenberg source repository, and published as `@wordpress/env` to npm. If you don't already have it, you'll need to install Docker and Docker Compose in order to use `wp-env`.

To install Docker, follow their instructions here for [Windows 10 Pro](https://docs.docker.com/docker-for-windows/install/), [all other version of Windows](https://docs.docker.com/toolbox/toolbox_install_windows/), [macOS](https://docs.docker.com/docker-for-mac/install/), or [Linux](https://docs.docker.com/v17.12/install/linux/docker-ce/ubuntu/#install-using-the-convenience-script). If running Ubuntu, see these [extended instructions for help and troubleshooting](/docs/contributors/env-ubuntu.md).

Expand All @@ -32,7 +30,7 @@ To install Docker Compose, [follow their instructions here](https://docs.docker.
Once Docker is installed and running, run this script to install WordPress, and build your local environment:

```bash
npm run env install
npx wp-env start
```

#### Alternative Method: Using an Existing Local WordPress Install
Expand All @@ -57,17 +55,10 @@ In Windows, you can set the `WP_DEVELOP_DIR` environment variable using the appr

#### Accessing the Local WordPress Install

Whether you decided to use Docker or an existing local WordPress install, the WordPress installation should now be available at `http://localhost:8889` (**Username**: `admin`, **Password**: `password`).
If this port is in use, you can override it using the `LOCAL_PORT` environment variable. For example running the below command on your computer will change the URL to
`http://localhost:7777` .

Linux/macOS: `export LOCAL_PORT=7777`
Windows using Command Prompt: `setx LOCAL_PORT "7777"`
Windows using PowerShell: `$env:LOCAL_PORT = "7777"`

If you're running [e2e tests](/docs/contributors/testing-overview.md#end-to-end-testing), this change will be used correctly.
The WordPress installation should now be available at `http://localhost:8888` (**Username**: `admin`, **Password**: `password`).
If this port is in use, you can override it using the `WP_ENV_PORT` environment variable. For more information, consult the `wp-env` [README](https://github.com/WordPress/gutenberg/blob/master/packages/env/README.md).

To shut down this local WordPress instance run `npm run env stop`. To start it back up again, run `npm run env start`.
To shut down this local WordPress instance run `npx wp-env stop`. To start it back up again, run `npx wp-env start` again.

#### Toggling Debug Systems

Expand All @@ -76,14 +67,14 @@ WordPress comes with specific [debug systems](https://wordpress.org/support/arti
Example on Linux/MacOS:

```bash
LOCAL_SCRIPT_DEBUG=false LOCAL_WP_DEBUG=false npm run env install
LOCAL_SCRIPT_DEBUG=false LOCAL_WP_DEBUG=false npx wp-env start
```

By default, both flags will be set to `true`.

#### Troubleshooting

You might find yourself stuck on a screen stating that "you are running WordPress without JavaScript and CSS files". If you tried installing WordPress via `npm run env install`, it probably means that something went wrong during the process. To fix it, try removing the `/wordpress` folder and running `npm run env install` again.
See the [relevant section in `wp-env` docs](https://github.com/WordPress/gutenberg/tree/master/packages/env#troubleshooting-common-problems).

## On A Remote Server

Expand Down

0 comments on commit 83ef9cb

Please sign in to comment.