This repo gives you a functioning wordpress dev environment. This repo is built on the wordpress:latest
docker container, and should remain up to date.
Setup is simple. Clone this repo, then:
docker compose up -d
docker compose exec wordpress bin/bootstrap
There are two files that you ought to customize before beginning development in earnest. The first is your docker compose.yml
file, where you'll want to change your container_name
to avoid conflicts.
Second, check ot the .env.dev
file for environment variables used by the bootstrap
script. Here you can change the username
, password
, or email
for the user created by the bootstrap
script.
After running bootstrap, there should be a user created with the following:
username: admin
password: password
You can log in by visiting localhost:8000/wp-admin
.
If you're writing a from-scratch theme for the new project, consider cabinet as a starting point.
degit apsislabs/cabinet wp-content/theme/<your-theme-folder>
If you need to register custom post types or custom taxonomies for the new project, consider carpenter.
degit apsislabs/carpenter wp-content/plugins/carpenter
If you want to completely reset your dev environment, the easiest way is to run:
$ docker compose down -v && docker compose up -d --build
This is aliased as bin/reset
.
This will remove the mounted volume where all local data is stored, then rebuild the container. If you do this, be sure to re-run:
$ docker exec <container name> bin/bootstrap
- Add the WP Engine as a remote endpoint:
git remote add staging <wpengine git url>
- Push to the remote:
git push staging <your branch here>
You can add the Production server as an endpoint the same way that we add Staging, but the preferred method of deployment to Production is to deploy with git
to Staging, and then to use WP Engine's dashboard to copy the Staging Site to Live.
wpengine-boilerplate
was built by Apsis Labs. We love sharing what we build! Check out our other libraries on Github, and if you like our work you can hire us to build your vision.