Kickstart WordPress projects with a sane development environment!
To start a project you need to download and install Docker and of course Git.
Once Docker is installed and running, run these commands from your terminal window:
git clone -o gitium [email protected]:presslabs/gitium-base AWESOME_SITE
cd AWESOME_SITE
git remote add origin [email protected]:GITHUB_USERNAME/AWESOME_SITE
git branch main --set-upstream-to origin/main
git push origin main
docker compose up
USER_ID="$(id -u)" GROUP_ID="$(id -g)" docker compose up
- Get a database dump from your hosting provider
- Download it locally and unpack it
- Import the database into your local MySQL:
cat database.sql | docker compose exec -T db mysql -u wordpress -pnot-so-secure wordpress
- Connect to the
wordpress
container:
docker compose exec wordpress bash
- Clear the cache from WP-CLI:
wp cache flush
Done!
Go to http://localhost:8080/wp-admin/ from your browser and log in to the local development environment.
We offer some extensions to the default configuration that allow you to change the running mode.
-
Generate a key and a certificate and place them in the root directory of the project under the names
certificate.key
andcertificate.crt
. -
Run docker compose overwriting the default ssl config like this:
docker compose -f docker-compose.yaml -f .dev/docker-compose.ssl.yaml up
docker compose -f docker-compose.yaml -f .dev/docker-compose.run-as-root.yaml up