Welcome to the WordPress Plugin Starter Template, developed by Hero Creative for our agency work. This project is actively maintained by our team, and we have made it available for others to use as well. Our goal with this template is to create a modular and maintainable foundation for building WordPress plugins, while keeping the project as simple as possible.
- Barebones Setup: This starter template provides a basic structure for creating a WordPress plugin, including stubs for various components such as cron jobs, REST API endpoints, custom post types, and custom taxonomies.
- Add_Action Handlers: Stubs for managing WordPress add_action handlers are included, allowing you to quickly implement your desired functionality.
- Unit Testing: The template comes with testing stubs for PHPUnit, making it easy to write and execute unit tests for your plugin.
- Admin Menu Registration: Basic admin menu registration is included, allowing you to easily create custom admin pages for your plugin.
- Plugin Lifecycle Management: The template is equipped with hooks for plugin activation, deactivation, and uninstallation, ensuring smooth lifecycle management.
- Modular Design: Our primary focus is on maintainability and modularity, helping you build plugins that are easy to extend and maintain.
- No Frontend Frameworks: We have intentionally left out frontend frameworks, but you have the flexibility to add any framework as needed based on your project requirements.
- Composer for Dependency Management: This template uses Composer to manage dependencies, streamlining the process of adding and updating packages.
- Autoloading: The Composer autoloader with PSR-4 support is included, simplifying the process of managing and loading classes.
- PHP Namespacing: This template uses PHP namespacing to organize and structure your code.
To start using this template, follow these steps:
- Clone the repository or download the source code.
- Run
composer install
to install dependencies and set up autoloading. - Rename the plugin folder and update the namespace within the
composer.json
file. - Update the plugin header information in the main plugin file.
- Start building your custom plugin features by modifying the stubs provided and creating new files as needed.
We hope you find this WordPress Plugin Starter Template useful for your projects. If you have any questions, issues, or suggestions, please feel free to open an issue on the GitHub repository or reach out to our team. Happy coding!