WP Bones - Laravel-style framework for WordPress plugins

WP Bones gives a WordPress plugin the shape of a modern PHP app: service providers, Blade views, Eloquent models, migrations and a bones CLI that scaffolds, renames and deploys. New since the first launch, in 33 releases: • 3.0: secure defaults, admin-only pages, nonces on forms, migrations once per site • A webpack build for React and TypeScript apps • 14 boilerplates you can open in WordPress Playground • 350 tests on PHP 8.1–8.4. Free and open source (LGPL).

Add a comment

Replies

Best
Hi Product Hunt 👋 I'm Giovambattista. I started WP Bones in 2015 because I wanted my WordPress plugins to feel like Laravel apps: service providers, Blade views, Eloquent, migrations, a command line. hunted it here in August 2024, on version 1.5. Thanks to everyone who tried it back then! Since then: 33 releases, up to 3.0.0 today. The highlights: 1. Secure defaults, new in 3.0 🔒 What your plugin doesn't declare is for administrators: pages and menus without a capability need manage_options, REST routes without a permission_callback refuse every request. Forms carry a nonce, migrations run once per site, and generated files leave the plugin folder. php bones migrate:to-v3 converts what it can and lists the rest. 2. A modern build ⚙️ Since 2.0, one webpack config on /scripts finds every app, script and stylesheet. React, TypeScript and LESS work out of the box, and php bones make:app scaffolds a new admin app. 3. 14 working plugins to start from 🧩 Two boilerplates at launch, 14 today: API, Blade, Cron, Custom Post Types, Database, Hooks, i18n, Mantine, Options, Packages, React, Routes, TypeScript and the base one. Each opens in WordPress Playground before you clone it. 4. A CLI that guards your files 🛡️ 27 commands. Generators never overwrite a file, the deploy checks where it's going and stops on a broken build, and what git ignores or Composer's dev packages stay out of the package. 5. Tested 🧪 No test suite at launch; 350 tests and 897 assertions today, on PHP 8.1 to 8.4, on every pull request. It's for PHP developers who know Laravel and have to ship WordPress plugins, or anyone whose plugin has outgrown one big file. It runs on any WordPress, and it's what my own plugins on WordPress.org are built on (Scotty, WP Bannerize Pro). Free and open source (LGPL) · PHP 8.1+ · docs, upgrade guides and live demos on wpbones.com What's the part of a WordPress plugin you still write by hand every time? That's what I'll look at next 👀 👉