arya / wordpress-plugin
WordPress Plugin Boilerplate
Installs: 99
Dependents: 0
Suggesters: 0
Security: 0
Stars: 4
Watchers: 0
Forks: 2
Open Issues: 2
Type:project
Requires
- php: ^7.0
This package is auto-updated.
Last update: 2025-04-16 14:35:35 UTC
README
WordPress Plugin Boilerplate
Boilerplate for building WordPress plugins.
Fundamental
Requirements
- PHP version 7.0 or greater
- WordPress 5.0 or greater
- Docker 20.10 or greater (Development)
- Grunt 1.4.0 (Development)
Features
PHP Standards Recommendations
WordPress
- Settings page
- About page
- Contextual Help
- Plugin action links
Install
Composer
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!
Grunt
Install Grunt
sudo npm install --global grunt-cli
npm install --silent
Build (Minify resources)
grunt
Handle the version of the plugin
grunt version
Docker
Create and start the container
docker compose up -d
Stop and remove containers, networks, images, and volumes
docker compose down --volumes
License
This project is licensed under the GNU General Public License, Version 2.0. See LICENSE for the full license text.