WordPress Plugin Boilerplate Generator
Generate a WordPress plugin boilerplate with your name, prefix and requirements, plus an optional admin page, saved settings, a widget and documented hooks. Download a ready-to-install ZIP.
Generate a WordPress plugin boilerplate with your name, prefix and requirements, plus an optional admin page, saved settings, a widget and documented hooks. Download a ready-to-install ZIP.
Be the first to share your experience
About this tool
WordPress Plugin Boilerplate Generator creates the starting files for a new plugin with your details already in place. Enter the plugin name, description, author, URLs, version, text domain, a constant prefix and the minimum WordPress and PHP versions, and the tool writes the main plugin file with a valid header, a singleton plugin class, activation and deactivation hooks, text-domain loading, and front-end CSS and JavaScript loaded the WordPress way. A readme.txt in the WordPress.org format and a helper functions file are always included. Optional parts are added only when you tick them: an admin menu page with tabs, a settings form built on the Settings API with sanitised saving, an example widget, and documented extension hooks that other developers can use. Every function, option and hook name uses a prefix made from your plugin slug, and the widget class is named after your plugin, so two generated plugins can run side by side. The ZIP is built in your browser and installs through Plugins → Add New → Upload Plugin.

Enter the name, description, author, URLs and version. The text domain is filled in from the name.
Choose the constant prefix and the minimum WordPress and PHP versions for the plugin header.
Add an admin page, saved settings, an example widget or documented hooks as needed.
Download the ZIP, then upload it at Plugins → Add New → Upload Plugin and activate it.
Every generated file passes PHP syntax checks, with valid prefixes and escaped strings even when names contain apostrophes.
The optional admin page includes a real Settings API form that saves and sanitises its option.
Prefixed functions, options and hooks, and a uniquely named widget class, avoid clashes with other plugins.
Optional files are only included when enabled, and admin CSS loads only on the plugin’s own screen.
Start with structure instead of a blank file
Move custom code out of functions.php into a plugin so it survives theme changes.
ExampleGenerate “Acme Site Tweaks” and paste existing snippets into includes/functions.php.
Deliver a feature with its own settings screen that clients can manage.
ExampleEnable the admin page and settings to give the client an on/off switch under their own menu item.
See how hooks, the Settings API and widgets fit together in working code.
ExampleInstall the generated plugin locally and follow how the settings form saves through options.php.
Start with the header fields and readme.txt structure the plugin directory expects.
ExampleFill in Requires at least and Requires PHP, then complete the generated readme.txt before submitting.
Keep shortcodes and custom functions working when the theme changes.
ExampleCustom shortcodes are moved from functions.php into a generated plugin before a redesign.
Start every client add-on from the same clean, prefixed structure.
ExampleEach client feature plugin uses the agency as author and a client-specific prefix to avoid clashes.
Good habits from the first file
Protect every form and AJAX action with current_user_can() and a nonce. The functions reference has copy-ready examples.
Open WordPress Functions ReferenceAdd an uninstall.php that deletes the plugin’s options when it is removed, so it does not leave data behind.
Update the Version header, the version constant and the readme.txt Stable tag together when you release.
Generate register_post_type() code with the CPT builder and add it to your plugin.
Open the CPT GeneratorUse esc_html, esc_attr and esc_url when printing data, as the generated admin page does, to prevent XSS.
Fire your own actions and filters, like the generated _init and _loaded hooks, so other developers can extend your plugin.