{"id":32471191,"url":"https://github.com/reenhanced/wp-dev-kit","last_synced_at":"2026-07-11T05:31:24.272Z","repository":{"id":320587407,"uuid":"976672531","full_name":"reenhanced/wp-dev-kit","owner":"reenhanced","description":"WordPress docker compose environment with automated plugin loading and wp-cli support","archived":false,"fork":false,"pushed_at":"2025-10-24T15:49:26.000Z","size":35,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-24T17:27:18.177Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/reenhanced.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-05-02T14:33:12.000Z","updated_at":"2025-10-24T15:45:13.000Z","dependencies_parsed_at":"2025-10-24T17:38:40.974Z","dependency_job_id":null,"html_url":"https://github.com/reenhanced/wp-dev-kit","commit_stats":null,"previous_names":["reenhanced/wp-dev-kit"],"tags_count":null,"template":true,"template_full_name":null,"purl":"pkg:github/reenhanced/wp-dev-kit","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reenhanced%2Fwp-dev-kit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reenhanced%2Fwp-dev-kit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reenhanced%2Fwp-dev-kit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reenhanced%2Fwp-dev-kit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/reenhanced","download_url":"https://codeload.github.com/reenhanced/wp-dev-kit/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reenhanced%2Fwp-dev-kit/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35352623,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-11T02:00:05.354Z","response_time":104,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-10-26T16:55:29.663Z","updated_at":"2026-07-11T05:31:24.266Z","avatar_url":"https://github.com/reenhanced.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# wp-dev-kit\n\n`wp-dev-kit` is a WordPress starter template powered by [`@wordpress/env`](https://developer.wordpress.org/block-editor/reference-guides/packages/packages-env/) (`wp-env`). It keeps the repository free of secrets, makes new site builds trivial, and stays flexible for custom Docker overrides and future automation.\n\n## Using this template\n\nThis repository is published as a GitHub template. To create a fresh project based on it:\n\n1. Click **Use this template** on the repository page and choose **Create a new repository**.\n2. Name your new repository, decide whether it should be public or private, and confirm the creation.\n3. Clone the newly created repository to your machine.\n4. Run `npm install` followed by `./setup.sh` to bootstrap WordPress with your preferred settings.\n\nPrefer the command line? The GitHub CLI can generate a repository directly:\n\n```bash\ngh repo create my-new-site --template reenhanced/wp-dev-kit\ncd my-new-site\nnpm install\n./setup.sh\n```\n\nEach derived repository remains independent, so any customisations or secrets stay within your project rather than the template.\n\n## Script overview\n\n| Script | When to use it | What it does |\n| --- | --- | --- |\n| `setup.sh` | First run after cloning your generated project | Prompts for site URL, ports, admin credentials, debugging, and multisite; writes `.wp-env.override.json`, a starter `.wp-env/docker-compose.override.yml`, and installs WordPress via `wp-env`. |\n| `build.sh` | Non-interactive restarts or CI-style spins | Starts `wp-env`, waits for WordPress to come online, and installs any plugin ZIPs found in `plugins/`. Uses the configuration already captured by `setup.sh`/wp-env defaults. |\n| `reset.sh` | Full local reset | Invokes `wp-env destroy --hard`, recreates `public_html/wp-content`, and leaves `.keep` placeholders so a fresh `setup.sh` run can rebuild the site. |\n| `install_plugins.sh` | Reinstall bundled plugin ZIPs | Uses `npx wp-env run cli` to install and activate ZIPs located in `plugins/`. |\n\nRun `setup.sh` once per clone to generate local overrides. After that, use `npm run start` whenever you need to bring the environment up quickly without prompts. Reach for `reset.sh` if you want to wipe data and start again, then rerun `setup.sh` to reapply your preferences.\n\n## Prerequisites\n\n- Node.js 20+ (for `npx` and local `@wordpress/env`)\n- Docker Desktop / Docker Engine\n\n## Getting started\n\n```bash\nnpm install\nnpm run start\n```\n\n`npm run start` (or `./build.sh`) does the following:\n- launches the wp-env containers (port `8067` by default; `setup.sh` auto-detects conflicts and proposes an open port)\n- waits for WordPress to finish installing\n- automatically installs any plugin ZIPs located in `plugins/`\n\nWhen the command finishes, log in at `http://localhost:8067/wp-admin/` using the default credentials `admin` / `password`. wp-env manages these defaults so they remain safe to store in version control.\n\n## Useful scripts\n\n| Command | Description |\n| --- | --- |\n| `npm run start` | Start the environment (alias for `wp-env start`). |\n| `npm run stop` | Stop the containers (`wp-env stop`). |\n| `npm run destroy` | Remove containers and volumes (`wp-env destroy --force`). |\n| `npm run destroy:hard` | Full reset including generated databases (`wp-env destroy --hard`). |\n| `npm run cli -- \u003ccmd\u003e` | Run arbitrary WP-CLI commands. Example: `npm run cli -- wp plugin list`. |\n| `npm run install-plugins` | Re-run ZIP based plugin installs from the `plugins/` directory. |\n| `./reset.sh` | Calls `wp-env destroy --hard` and cleans the local content folders. |\n\n## Project layout\n\n```\n.\n├── .wp-env.json              # wp-env configuration (no secrets)\n├── build.sh                  # Wrapper around wp-env start + plugin bootstrap\n├── LICENSE                   # MIT licence\n├── plugins/                  # Drop plugin ZIP archives here; stays out of git\n├── public_html/wp-content/   # Custom themes, mu-plugins, uploads, etc.\n└── README.md\n```\n\n- `public_html/wp-content` maps into the container so you can develop custom code in-place.\n- `plugins/` mounts to `/var/www/html/wp-content/wp-dev-kit-packages/` inside the container. Any ZIP placed here is available for `wp plugin install` commands.\n- Everything under `db/`, `plugins/`, and `public_html/` stays out of version control except for `.keep` placeholders, ensuring secrets and generated content remain local.\n\n## Overriding wp-env settings\n\n- To change `WP_HOME`, `WP_SITEURL`, or any other WordPress constant, edit the `config` object in `.wp-env.override.json`. This is what wp-env actually reads. Alternatively, rerun `./setup.sh` to regenerate it interactively.\n- Add Docker labels or other compose tweaks by running `npm run start` once so `.wp-env/docker-compose.yml` exists, then create `.wp-env/docker-compose.override.yml` with your local additions. wp-env respects the override file on subsequent starts.\n\nExample override snippet for labels:\n\n```yaml\n# .wp-env/docker-compose.override.yml\nservices:\n  wordpress:\n    labels:\n      traefik.enable: \"true\"\n      traefik.http.routers.wp-dev-kit.rule: Host(`example.local`)\n```\n\nOverride files live inside `.wp-env/` (which is gitignored), so machine-specific labels or secrets stay out of the template.\n\n## Troubleshooting\n\n| Problem | Fix |\n| --- | --- |\n| **Docker is not running** | Start Docker Desktop (or the Docker daemon) and try again. |\n| **Port already in use** | `setup.sh` auto-detects busy ports and suggests the next available one. You can also pass a custom port when prompted. |\n| **`npx` or `node` not found** | Install Node.js 20+ via [nvm](https://github.com/nvm-sh/nvm) or your system package manager. |\n| **Permission denied on scripts** | Run `chmod +x setup.sh build.sh reset.sh install_plugins.sh`. |\n| **WordPress keeps re-installing** | If `setup.sh` detects an existing install it will skip the install step. Run `./reset.sh` first for a truly fresh start. |\n| **Plugin ZIP not installing** | Ensure the file is in the `plugins/` directory with a `.zip` extension. |\n\n## License\n\nThis project is licensed under the [MIT License](LICENSE).\n\n## Running custom WP-CLI commands\n\nUse `npm run cli -- \u003ccommand\u003e` or `npx wp-env run cli \u003ccommand\u003e`. For example:\n\n```bash\nnpm run cli -- wp option update blogname \"Local Dev\"\n```\n\nThis command executes inside the WordPress container with access to the mapped content and plugin ZIPs.\n\n## Resetting the environment\n\nIf you need a clean slate:\n\n```bash\n./reset.sh\nnpm run start\n```\n\n`reset.sh` runs `wp-env destroy --hard`, clears generated content directories, and recreates placeholder files so a fresh `./setup.sh` or `npm run start` can rebuild the site.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freenhanced%2Fwp-dev-kit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Freenhanced%2Fwp-dev-kit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freenhanced%2Fwp-dev-kit/lists"}