What's new since August 2024
๐ฆด WP Bones is back on Product Hunt: 33 releases since the first launch
On August 5, 2024 WP Bones launched here at 1.5.5: a framework that brings Laravel's habits to WordPress plugins. Two years and 33 releases later (1.6.0 โ 3.0.0), here's what's new ๐
๐ Secure by default (3.0)
๐ช Pages and menus that declare no capability need manage_options; REST routes without a permission_callback refuse every request
๐ก๏ธ Every request that changes something on a WP Bones admin page carries the plugin's nonce: $plugin->csrfField() in the form, checked before any controller runs; logged Ajax actions need one too
๐๏ธ Migrations run once per site, recorded in an option, on activation or after a version change, however the update arrived; a lock keeps two requests from running them twice; seeders are migrations now
๐ Compiled Blade views and logs go to uploads/wpbones/, behind an index.php and a deny-all .htaccess
๐งญ php bones migrate:to-v3 converts the migrations and seeders, then lists the pages, routes, forms and Ajax providers that still need a look. Upgrading from 2.x:
composer require "wpbones/wpbones:^3.0"
php bones migrate:to-v3โ๏ธ A modern build (2.0)
๐ฆ One webpack config on @wordpress/scripts finds every app, script and stylesheet in resources/assets: TypeScript and LESS out of the box, no more Gulp
โจ php bones make:app scaffolds a React/TypeScript admin app; php bones migrate:to-v2 moves a 1.x plugin over
๐งฐ The bones CLI, 27 commands
๐ Generators never overwrite a file unless you pass --force; Folder/Class works in every one of them
๐ deploy checks where it's going before it builds, stops on a failed build, leaves out what git ignores and Composer's dev packages, and can create a ZIP
๐ Runs from any folder; rename touches only what changes; update no longer removes the framework first
๐งช php bones tinker shows errors and values; custom commands can load WordPress and reach your plugin
โฐ make:schedule for WordPress cron jobs
๐๏ธ Database
๐ The query builder escapes every value and validates identifiers
๐ชถ Eloquent on SQLite, so it works in WordPress Playground and Studio, and on MySQL with WordPress's own charset: emoji survive the round trip
๐ท๏ธ Tables with or without the WordPress prefix
๐งฉ Boilerplates and demos
๐ From 2 boilerplates to 14: API, Base, Blade, Cron, Custom Post Types, Database, Hooks, Internationalization, Mantine, Options, Packages, React, Routes, TypeScript
โถ๏ธ Each one opens in WordPress Playground from wpbones.com before you clone it
๐งช Tested
โ From no test suite to 350 tests and 897 assertions, on PHP 8.1 to 8.4, on every pull request; a deprecation fails the build
๐งก And more
๐ Translations for React apps and blocks, with make-pot and make-json scripts
๐ฉ A Flags package for feature flags from YAML files
๐จ Asset managers that enqueue admin and front-end scripts the WordPress way
๐ WP Bones for Raycast: the docs and the boilerplates one keystroke away
๐ A new home at wpbones.com, with upgrade guides for 2.0 and 3.0
Thanks to everyone who sent code: dansleboby, balazsnasz and bredecl on GitHub ๐
Free and open source ยท PHP 8.1+ โ https://wpbones.com
What should WP Bones learn next? Tell me below ๐


p/runevr
p/reso
p/producthunt
p/google-cloud-platform
p/many-displays
p/slotify-2
p/airuncode
p/ai-context-flow
p/kodlo
p/aperture-7
p/raycast
p/lasso-11
p/dino-kids
p/kuc-kuc
p/supabase
p/jev
p/offiai
p/murror
p/dex-by-exmergo
p/htmldrag
Replies
Be the first to reply
Have a question or a thought to share? Add a comment above to start the conversation.