Skip to content

Introduction

Creating a WordPress plugin can be quite simple. You can start with just one PHP file.

However, in recent years, WordPress has introduced new features, such as the block editor (Gutenberg), which requires a different approach to plugin development. The minimum requirements for WordPress have also been updated to PHP 7.4, allowing developers to use modern PHP features.

On top of those, we’ll need to make sure that our code is well organized and use the right tools to make it easier to manage and maintain as the plugin grows and gains more features.

This is why we created wp-starter-plugin. It’s a boilerplate that provides a basic structure for your plugin. It includes some popular development tools pre-configured to help you get started quickly and develop your plugin more efficiently with a modern development workflow.

Here are some of the tools included in this boilerplate:

  • PHPCS: Checks and fixes code styles according to common PHP practices.
  • PHP-Scoper: Prevents class or function name collisions with other plugins.
  • Webpack (via @wordpress/scripts): Bundles and optimizes assets.
  • ESLint: Checks and fixes code styles according to common JavaScript practices.