-
Notifications
You must be signed in to change notification settings - Fork 1
Add local environment support. #374
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
base: main
Are you sure you want to change the base?
Conversation
This introduced the `bedrock-wp-env` package to Project Base, which allows for a bedrock, or bedrock-style project setup access to a quick and handy local environment based on `wp-env`.
I'm not sure if we should default the database vars and local url to this new environment or leave them default for LocalWP thought. |
I like this (more Docker!) and it works for me, but it is difficult for me to judge its usefulness as I use my own manual Docker setup. It would be great if LocalWP users could test it and give feedback, would they use this instead? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Can we keep the same db config as LocalWP so we don't need to change
.env
when switching between this setup and LocalWP? - Is
@clorith/bedrock-wp-env
being maintained? The last commit is from April '22.
Getting a convenient environment running quickly with sites built on Project Base has often been a matter of developers needing to find what works for them, which makes things very open and free, but for some, they just want something that's there, and that works.
The
wp-env
package solved this for single plugin, theme, or project setups that were built on a normal WordPress folder, but there was never a good direct solution for sites with composer based setups built on the Bedrock principles, that is, until now!This PR introduces the
bedrock-wp-env
package, which allows any user with Docker installed the ability to quickly spin up a local environment with a simple call tonpm run env start
!The environment is slightly opinionated, while at the same time being as flexible as possible. It uses Apache at its base, which should hopefully save any developers from needing to understand server configurations if plugins or themes require custom redirect rules, they should be able to just rely on WordPress rewrite engine to handle it for them, or to generate the hard written rules if needed.
A set of new files are required for this (but they are only needed locally, this is why they are added to the
.gitignore file
); Namely theindex.php
in the project root (there to prevent the Docker images from downloading WordPress core files in duplicate), and the.htaccess
file within the web root folder (public/.htaccess
in the case of Project Base).To go along with the new possibility of a local environment, is a new
documentation
folder; The intent of which is two-fold: