Skip to content
This repository has been archived by the owner on May 15, 2024. It is now read-only.

Add wp-env support #85

Merged
merged 7 commits into from
Nov 4, 2020
Merged

Add wp-env support #85

merged 7 commits into from
Nov 4, 2020

Conversation

joemcgill
Copy link
Contributor

@joemcgill joemcgill commented Oct 27, 2020

This adds support for using the @wordpress/env local environment setup now that WordPress/gutenberg#26507 has been merged.

Added:

  • A new package.json file, which adds @wordpress/env as a dependency and a script for running the environment. See docs for wp-env.
  • A .wp-env.json file which configures wp-env for our project

@joemcgill
Copy link
Contributor Author

Note for testing: even thought the PR for setting ports for WP_HOME has merged, it's still unreleased, so to test this locally you'll need to clone the latest version of https://github.com/WordPress/gutenberg and run the following:

# Run npm link from the gutenberg/packages/env directory.
cd {path-to}/gutenberg/packages/env
npm install && npm link

# Link the irving-dev dependency of wp-env
cd {path-to}/irving-dev/
npm link @wordpress/env

# Spin up the environment
npm run wp-env start

WordPress should now be installed and running at http://localhost:8888/wp-admin/.
You can check that the npm link worked correctly by visiting Options > General in your and check that the Site Address (URL) is set to http://localhost:3001.

This ensures that uploads will persist locally and simplifies the whole
setup a bit. Also adds a root index.php file to .gitignore.
Copy link
Contributor

@jameswburke jameswburke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🐝

@joemcgill joemcgill merged commit 56f08a8 into production Nov 4, 2020
@joemcgill joemcgill deleted the add/wp-env-support branch November 4, 2020 01:01
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants