Boilerplate for building WordPress plugins.
- PHP version 7.0 or greater
- WordPress 5.0 or greater
- Docker 20.10 or greater (Development)
- Grunt 1.4.0 (Development)
- Settings page
- About page
- Contextual Help
- Plugin action links
composer create-project --no-install --remove-vcs arya/wordpress-plugin your-plugin dev-master
cd your-plugin
You'll need to rename
- The directory
plugin-name
toyour-plugin
- The file
plugin-name.php
toyour-plugin.php
Then find and replace in all the templates
plugin-name
toyour-plugin
plugin_name
toyour_plugin
PLUGIN_NAME
toYOUR_PLUGIN
PluginName
toYourPlugin
(Namespace)
If you are a Linux or macOS user, you can use the command sed
egrep -lRZ 'plugin-name' . | xargs -0 -l sed -i -e 's/plugin-name/your-plugin/g'
Finally, edit the composer.json file to declare plugin dependencies
composer install --prefer-dist
Happy Coding!
Install Grunt
sudo npm install --global grunt-cli
npm install --silent
Build (Minify resources)
grunt
Handle the version of the plugin
grunt version
Create and start the container
docker compose up -d
Stop and remove containers, networks, images, and volumes
docker compose down --volumes
This project is licensed under the GNU General Public License, Version 2.0. See LICENSE for the full license text.