{"id":14954949,"url":"https://github.com/vojay-dev/wp-plugin-boilerplate","last_synced_at":"2025-10-24T07:30:38.466Z","repository":{"id":229346747,"uuid":"776459467","full_name":"vojay-dev/wp-plugin-boilerplate","owner":"vojay-dev","description":"WordPress plugin development boilerplate to jumpstart WordPress plugin projects with Docker and Github Actions (includes examples for an admin page, shortcode and Gutenberg block)","archived":false,"fork":false,"pushed_at":"2024-03-24T14:22:13.000Z","size":1577,"stargazers_count":45,"open_issues_count":0,"forks_count":16,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-29T08:11:49.389Z","etag":null,"topics":["boilerplate","docker","docker-compose","php","wordpress","wordpress-development","wordpress-plugin","wordpress-site"],"latest_commit_sha":null,"homepage":"http://vojay.de/","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vojay-dev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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}},"created_at":"2024-03-23T15:13:37.000Z","updated_at":"2025-01-29T03:58:14.000Z","dependencies_parsed_at":"2024-03-23T18:27:56.188Z","dependency_job_id":"8b01263b-ddf8-4eb6-ac33-a1de44b6fc5a","html_url":"https://github.com/vojay-dev/wp-plugin-boilerplate","commit_stats":{"total_commits":9,"total_committers":2,"mean_commits":4.5,"dds":"0.11111111111111116","last_synced_commit":"04c2432a4e9c0363546284f15a60c2f2950f0e1c"},"previous_names":["vojay-dev/wp-plugin-boilerplate"],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vojay-dev%2Fwp-plugin-boilerplate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vojay-dev%2Fwp-plugin-boilerplate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vojay-dev%2Fwp-plugin-boilerplate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vojay-dev%2Fwp-plugin-boilerplate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vojay-dev","download_url":"https://codeload.github.com/vojay-dev/wp-plugin-boilerplate/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":237932060,"owners_count":19389560,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["boilerplate","docker","docker-compose","php","wordpress","wordpress-development","wordpress-plugin","wordpress-site"],"created_at":"2024-09-24T13:10:16.984Z","updated_at":"2025-10-24T07:30:33.019Z","avatar_url":"https://github.com/vojay-dev.png","language":"PHP","readme":"# WordPress plugin development boilerplate\n\n![Logo](doc/wp-boilerplate.png)\n\nThis project is a WordPress plugin development boilerplate to jumpstart WordPress plugin projects. It utilizes Docker for a local environment and includes an automated setup of WordPress with a configurable admin user and password.\n\n![Plugin example](doc/plugin.png)\n\nWith the boilerplate you get a simple template to get started with a plugin, which includes a dedicated **admin page**, an example **shortcode to be rendered on any page** as well as a **custom Gutenberg block**.\n\nFurthermore it includes a build script and Github Workflow to generate an installable plugin release.\n\n**Environment:**\n* Docker\n* Linux, macOS\n\nSimply create a fork of this repo and get started by implementing your plugin in an efficient environment.\n\n## Setup\n\n* Fork the project\n* Adjust the plugin name in `.env`\n* Enable access to the `GITHUB_TOKEN` for the Github workflow to create releases: `Repository settings` -\u003e `Actions` -\u003e `General` -\u003e `Workflow permission` -\u003e select `Read and write permissions`.\n\n![Workflow settings](doc/workflow-settings.png)\n\nCommands to interact with Docker as well as building the plugin are encapsulated in the `Makefile`.\n\n## Start local WordPress via Docker\n```sh\nmake wp-start\n```\n\nThis starts a local WordPress and database container. It uses the latest WordPress version and installs the WordPress CLI to automatically setup an admin user with the configured user and password in `.env`. After the setup is complete, you will get details on how to access WordPress in the log output.\n\n![Start WordPress](doc/wp-start.png)\n\nAfter starting the Docker setup, you can reach WordPress locally via:\n\n* Frontend: http://localhost:8080\n* Backend: http://localhost:8080/wp-admin\n\nYour plugin is already installed automatically and can be activated!\n\n![Plugin example](doc/plugin-example.png)\n\n## Stop local WordPress via Docker\n```sh\nmake wp-stop\n```\n\n## Build plugin\n```sh\nmake\n```\n\nThis command will trigger the `bin/build.sh` script with the configured plugin name in `.env` to create an installable WordPress plugin `.zip` file.\n\n![Build plugin](doc/build.png)\n\nAlso the Github workflow in `.github/workflows/build.yml` will automatically build the plugin and create a release with the `.zip` file on any push to `main`.\n\n![Release plugin](doc/release.png)\n\n## Plugin development\n\nThe source of your plugin is in `src/`. There are already examples added, to get started quickly:\n\n* `src/index.php`: General setup and global variables / functions\n* `src/admin.php`: Admin page\n* `src/frontend.php`: Code to render the custom shortcode\n* `src/block.js`: Custom Gutenberg block example\n* `src/script.js`: Custom JS code loaded with your plugin\n* `src/style.css`: Custom CSS code loaded with your plugin\n\nWith the given example, you will get a custom admin page, a shortcode `[my-plugin]` that will be rendered with a \"Hello World!\" example as well as a custom Gutenberg block that simply renders a text.\n\n**Shortcode:**\n\n![Shortcode example 1](doc/frontend1.png)\n![Shortcode example 2](doc/frontend2.png)\n\n**Gutenberg block:**\n\n![Gutenberg example](doc/block.png)\n\n**Admin page:**\n\n![Admin example](doc/plugin.png)\n\nFrom here, you can get started with your plugin within an efficient local environment including a build workflow.\n\n\u003e If you use this boilerplate, feel free to star ⭐️ this repo and add your project to this README. Knowledge shared is knowledge squared!\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvojay-dev%2Fwp-plugin-boilerplate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvojay-dev%2Fwp-plugin-boilerplate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvojay-dev%2Fwp-plugin-boilerplate/lists"}