Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

What the heck is wp-env? #89

Closed
bph opened this issue Mar 2, 2023 Discussed in #33 · 23 comments
Closed

What the heck is wp-env? #89

bph opened this issue Mar 2, 2023 Discussed in #33 · 23 comments
Assignees
Labels

Comments

@bph
Copy link
Collaborator

bph commented Mar 2, 2023

Discussed in #33

Originally posted by mburridge December 9, 2022
I propose an article on local WordPress environments for developers with an emphasis on wp-env, explaining what it is, what the benefits of using it are, and how to use it. The post should include plenty of screenshots of wp-env in action.

Outline

Local WordPress environments
Local WP environment - what and why
A brief survey of:

  • MAMP/WAMP/XAMPP
  • Local (Flywheel)
  • Valet (Laravel)
  • DevKinsta (Kinsta)

What is wp-env?
Allows you to spin up a transitory WordPress environment from the command line.
Primarily for development.
Requires Docker.
Requires Node/NPM.

Why use wp-env?
Quick and easy way to spin up a temporary WordPress environment for testing and development.
Doesn't require a monolithic installation.
Zero config.
Provides a testing environment on port 8889

Installation
Via NPM, either globally with -g switch, or in an existing project with a package.json file as a dev dependency
Test with wp-env --version

Usage
wp-env start from project folder, or npm rum wp-env start if installed as a dev dependency
If Docker is not running you'll get an error
Can run in browser with localhost:8888 - login credentials, etc...
Stop the environment with wp-env stop
Can run WP-CLI commands with wp-env run cli [command]
Can customise environment with a .wp-env.json file

Troubleshooting
Detail various troubleshooting steps

References

@bph bph added flow: needs input let's discuss this. flow: approved can move forward Tutorial Tooling labels Mar 2, 2023
@juanmaguitar
Copy link
Contributor

Another reference:

@mburridge
Copy link

A first draft of the article is ready for review.

@mburridge mburridge added flow: needs review reviewer wanted and removed flow: needs input let's discuss this. labels Mar 20, 2023
@justintadlock
Copy link

It reads pretty well from a technical standpoint. Everything seems easy to follow, and this should help folks easily spin up a dev install without much work. Review notes left in the doc.

@mburridge
Copy link

The public preview of the wp-env post is now available for review

@mburridge
Copy link

Pre-publish checklist:

  • Post Title in Sentence case
  • Are Category or Categories selected?
  • All images with alt-text?
  • Are Tags identifies?
  • Is there an Excerpt?
  • Props added?

@juanmaguitar
Copy link
Contributor

juanmaguitar commented Mar 23, 2023

Why does this preview have a different layout than the published articles?

Screenshot 2023-03-23 at 12 37 15

Screenshot 2023-03-23 at 12 38 38

@bph
Copy link
Collaborator Author

bph commented Mar 23, 2023

Ah right. We changed the template from "default"to "center column'
At the moment it needs to be manually assigned in the post settings..

@mburridge
Copy link

Fixed it.

@juanmaguitar
Copy link
Contributor

@bph @justintadlock what's the purpose of the "Updates" category?
I'm not sure this type of content belongs there
I also think the "Concepts" category is for more theoretical content.

@mburridge
Copy link

mburridge commented Mar 23, 2023

Not sure how 'Updates' got in there. I've removed it.
I added the 'Concepts' category as setting up a local environment is a concept that developers need to get to grips with. Happy to remove if it's deemed not appropriate.

@mburridge
Copy link

I'm guessing the 'Updates' category is for the "What's new for developers" monthly posts.

@bph
Copy link
Collaborator Author

bph commented Mar 23, 2023

"Updates" is also the default category, a way to avoid the dorky "uncategorized" category, if someone misses to assign any category.

The description for Updates reads:
"Find notes about updates to documentation pages, what’s new in Gutenberg plugin, coming in the next WordPress release and more"

Concepts - The three posts that are in the category now, seem to fit the bill @juanmaguitar and I hope these answers your questions :-)

@juanmaguitar
Copy link
Contributor

@juanmaguitar and I hope these answers your questions :-)

Yes! Thanks a lot for the clarification @bph

@mburridge
Copy link

Following a suggestion from @bph I've changed the title of the article to "Quick and easy local WordPress development with wp-env"

@mburridge
Copy link

The article is almost ready to publish. I'm just in the process of fact-checking and verifying one technical point (here and here) to ensure that I don't publish inaccurate or misleading content.

@marybaum
Copy link
Member

Would you like me to do a drive-by later today? I’m afk until 17:00 but can do it then

@marybaum
Copy link
Member

That’s what I call my copy reviews, because they tend to happen fast and raise the energy level of the piece

@marybaum
Copy link
Member

I've had my way with this in the drive-by. See what you think! Do check out some text I added about MAMP, which I used to use, and of course remove it if I have lied.

@marybaum
Copy link
Member

marybaum commented Mar 24, 2023

I also really amped up the drama in the intro. If you think I went overboard, perfectly okay to nuke some of the violins 😜

@mburridge
Copy link

Thanks for that @marybaum . You've definitely raised the energy level of the article. I have taken the liberty of toning things down a bit in places, or re-wording things so that my "voice" comes through again. Hope you don't mind.

@mburridge
Copy link

mburridge commented Mar 27, 2023

@bph I've done a final run through and kept most of Mary's changes which definitely made the article more dynamic and energetic. I think it's ready to publish now.
Public preview: https://developer.wordpress.org/news/?p=1120&preview=1

@marybaum
Copy link
Member

I don't mind at all! I wear my heart on my sleeve, and having used MAMP, DTS and Local I kinda knew where the pain points were so I could really twist the knife. So I figured you might want to dial back!

Actually, I did install wp-env and decided having to have hidden files showing to use it (unless I was mistaken?) didn't fit my desktop aesthetic (You can make an art director into a coder, but you'll never get the art director out of the coder ... ;-D )

@mburridge
Copy link

Published

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Published (Done)
Development

No branches or pull requests

5 participants