wpstarter / framework
The WpStarter Framework - Laravel Framework for WordPress
Requires
- php: ^8.2
- composer-runtime-api: ^2.2
- ext-ctype: *
- ext-filter: *
- ext-hash: *
- ext-mbstring: *
- ext-openssl: *
- ext-session: *
- ext-tokenizer: *
- brick/math: ^0.11|^0.12|^0.13|^0.14
- doctrine/inflector: ^2.0.5
- dragonmantank/cron-expression: ^3.4
- egulias/email-validator: ^3.2.1|^4.0
- fruitcake/php-cors: ^1.3
- guzzlehttp/guzzle: ^7.8.2
- guzzlehttp/uri-template: ^1.0
- league/commonmark: ^2.8.1
- league/flysystem: ^3.25.1
- league/flysystem-local: ^3.25.1
- league/uri: ^7.5.1
- monolog/monolog: ^3.0
- nesbot/carbon: ^3.8.4
- nunomaduro/termwind: ^2.0
- psr/container: ^1.1.1|^2.0.1
- psr/log: ^1.0|^2.0|^3.0
- psr/simple-cache: ^1.0|^2.0|^3.0
- ramsey/uuid: ^4.7
- symfony/console: ^7.2.0
- symfony/error-handler: ^7.2.0
- symfony/finder: ^7.2.0
- symfony/http-foundation: ^7.2.0
- symfony/http-kernel: ^7.2.0
- symfony/mailer: ^7.2.0
- symfony/mime: ^7.2.0
- symfony/polyfill-php83: ^1.33
- symfony/polyfill-php84: ^1.34
- symfony/polyfill-php85: ^1.34
- symfony/process: ^7.2.0
- symfony/routing: ^7.2.0
- symfony/uid: ^7.2.0
- symfony/var-dumper: ^7.2.0
- tijsverkoyen/css-to-inline-styles: ^2.2.5
- vlucas/phpdotenv: ^5.6.1
- voku/portable-ascii: ^2.0.2
Requires (Dev)
- ext-gmp: *
- ably/ably-php: ^1.0
- aws/aws-sdk-php: ^3.322.9
- fakerphp/faker: ^1.24
- guzzlehttp/promises: ^2.0.3
- guzzlehttp/psr7: ^2.4
- league/flysystem-aws-s3-v3: ^3.25.1
- league/flysystem-ftp: ^3.25.1
- league/flysystem-path-prefixing: ^3.25.1
- league/flysystem-read-only: ^3.25.1
- league/flysystem-sftp-v3: ^3.25.1
- mockery/mockery: ^1.6.10
- opis/json-schema: ^2.4.1
- pda/pheanstalk: ^5.0.6|^7.0.0
- php-http/discovery: ^1.15
- phpstan/phpstan: ^2.1.41
- phpunit/phpunit: ^10.5.35|^11.5.3|^12.0.1
- predis/predis: ^2.3|^3.0
- resend/resend-php: ^0.10.0|^1.0
- symfony/cache: ^7.2.0
- symfony/http-client: ^7.2.0
- symfony/psr-http-message-bridge: ^7.2.0
- symfony/translation: ^7.2.0
- wpstarter/o-testbench-core: ^2.1.1
Suggests
- ext-apcu: Required to use the APC cache driver.
- ext-fileinfo: Required to use the Filesystem class.
- ext-ftp: Required to use the Flysystem FTP driver.
- ext-gd: Required to use WpStarter\Http\Testing\FileFactory::image().
- ext-memcached: Required to use the memcache cache driver.
- ext-pcntl: Required to use all features of the queue worker and console signal trapping.
- ext-pdo: Required to use all database features.
- ext-posix: Required to use all features of the queue worker.
- ext-redis: Required to use the Redis cache and queue drivers (^4.0|^5.0|^6.0).
- ably/ably-php: Required to use the Ably broadcast driver (^1.0).
- aws/aws-sdk-php: Required to use the SQS queue driver, DynamoDb failed job storage, and SES mail driver (^3.322.9).
- brianium/paratest: Required to run tests in parallel (^7.0|^8.0).
- fakerphp/faker: Required to generate fake data using the fake() helper (^1.23).
- filp/whoops: Required for friendly error pages in development (^2.14.3).
- laravel/tinker: Required to use the tinker console command (^2.0).
- league/flysystem-aws-s3-v3: Required to use the Flysystem S3 driver (^3.25.1).
- league/flysystem-ftp: Required to use the Flysystem FTP driver (^3.25.1).
- league/flysystem-path-prefixing: Required to use the scoped driver (^3.25.1).
- league/flysystem-read-only: Required to use read-only disks (^3.25.1)
- league/flysystem-sftp-v3: Required to use the Flysystem SFTP driver (^3.25.1).
- mockery/mockery: Required to use mocking (^1.6).
- pda/pheanstalk: Required to use the beanstalk queue driver (^5.0).
- php-http/discovery: Required to use PSR-7 bridging features (^1.15).
- phpunit/phpunit: Required to use assertions and run tests (^10.5.35|^11.5.3|^12.0.1).
- predis/predis: Required to use the predis connector (^2.3|^3.0).
- psr/http-message: Required to allow Storage::put to accept a StreamInterface (^1.0).
- pusher/pusher-php-server: Required to use the Pusher broadcast driver (^6.0|^7.0).
- resend/resend-php: Required to enable support for the Resend mail transport (^0.10.0|^1.0).
- symfony/cache: Required to PSR-6 cache bridge (^7.2).
- symfony/filesystem: Required to enable support for relative symbolic links (^7.2).
- symfony/http-client: Required to enable support for the Symfony API mail transports (^7.2).
- symfony/mailgun-mailer: Required to enable support for the Mailgun mail transport (^7.2).
- symfony/postmark-mailer: Required to enable support for the Postmark mail transport (^7.2).
- symfony/psr-http-message-bridge: Required to use PSR-7 bridging features (^7.2).
Provides
- psr/container-implementation: 1.1|2.0
- psr/log-implementation: 1.0|2.0|3.0
- psr/simple-cache-implementation: 1.0|2.0|3.0
Conflicts
- tightenco/collect: <5.5.33
Replaces
None
- 2.x-dev
- v2.1.6
- v2.1.5
- v2.1.4
- v2.1.3
- v2.1.2
- v2.1.1
- v2.1.0
- v2.0.2
- v2.0.0
- 1.x-dev
- v1.10.1
- v1.10.0
- v1.9.10
- v1.9.9
- v1.9.8
- v1.9.7
- v1.9.6
- v1.9.5
- v1.9.4
- v1.9.3
- v1.9.2
- v1.9.1
- v1.9.0
- v1.8.6
- v1.8.5
- v1.8.4
- v1.8.3
- v1.8.2
- v1.8.1
- v1.8.0
- v1.7.10
- v1.7.9
- v1.7.8
- v1.7.7
- v1.7.6
- v1.7.5
- v1.7.4
- v1.7.3
- v1.7.2
- v1.7.1
- v1.7.0
- v1.6.11
- v1.6.10
- v1.6.9
- v1.6.8
- v1.6.7
- v1.6.6
- v1.6.5
- v1.6.4
- v1.6.3
- v1.6.2
- v1.6.1
- v1.6.0
- v1.5.7
- v1.5.6
- v1.5.5
- v1.5.4
- v1.5.3
- v1.5.2
- v1.5.1
- v1.5.0
- v1.4.18
- v1.4.17
- v1.4.16
- v1.4.15
- v1.4.14
- 1.4.13
- v1.4.12
- v1.4.11
- v1.4.10
- v1.4.9
- v1.4.8
- v1.4.7
- v1.4.6
- v1.4.5
- v1.4.4
- v1.4.3
- v1.4.2
- v1.4.1
- v1.4.0
- v1.3.9
- v1.3.8
- v1.3.7
- v1.3.6
- v1.3.5
- v1.3.4
- v1.3.3
- v1.3.2
- v1.3.1
- v1.3
- v1.2.10
- v1.2.9
- v1.2.8
- v1.2.7
- v1.2.6
- v1.2.5
- v1.2.4
- v1.2.3
- v1.2.2
- v1.2.1
- v1.2.0
- v1.1.5
- v1.1.4
- v1.1.3
- v1.1.2
- v1.1.1
- v1.1.0
- v1.0.11
- v1.0.10
- v1.0.9
- v1.0.8
- v1.0.7
- v1.0.6
- v1.0.5
- v1.0.4
- v1.0.3
- v1.0.2
- v1.0.1
- v1.0
- dev-1.x-dev
This package is auto-updated.
Last update: 2026-10-05 17:22:07 UTC
README
WpStarter is a Laravel port for WordPress. It brings Laravel-style application structure, dependency injection, routing, Eloquent, Blade views, validation, caching, queues, and other framework services into WordPress, with integrations for its hooks, content, and admin menus.
This repository contains the wpstarter/framework Composer package. To build an application, start with the WpStarter application skeleton.
Version mapping
| WpStarter | Laravel baseline |
|---|---|
| 1.x | 8.x |
| 2.x | 12.x |
WpStarter 2.x requires PHP 8.2 or later. See composer.json for the PHP extensions and dependencies required by this checkout.
The mapping identifies the Laravel version the port is based on. WordPress integration and WpStarter-specific changes mean it is not a guarantee that every Laravel package or example works unchanged.
Namespaces and helpers
Illuminate becomes WpStarter
Framework classes use the WpStarter namespace in place of Laravel's Illuminate namespace. For example:
| Laravel | WpStarter |
|---|---|
Illuminate\Http\Request |
WpStarter\Http\Request |
Illuminate\Database\Eloquent\Model |
WpStarter\Database\Eloquent\Model |
Illuminate\Support\Facades\Cache |
WpStarter\Support\Facades\Cache |
Illuminate\Support\ServiceProvider |
WpStarter\Support\ServiceProvider |
When adapting Laravel code, update imports and type hints. Packages that depend directly on Illuminate classes may need additional adaptation.
Laravel-style helpers use ws_
Laravel-style global helpers are prefixed with ws_ to reduce naming conflicts in the WordPress environment:
| Laravel | WpStarter |
|---|---|
app() |
ws_app() |
config() |
ws_config() |
view() |
ws_view() |
route() |
ws_route() |
request() |
ws_request() |
redirect() |
ws_redirect() |
cache() |
ws_cache() |
__() |
ws___() |
use WpStarter\Support\Facades\Cache; $name = ws_config('app.name'); $value = Cache::get('example'); return ws_view('dashboard', ['name' => $name, 'value' => $value]);
WordPress integration also provides helpers such as ws_admin_url(), ws_admin_notice(), ws_enqueue_js(), and ws_enqueue_css().
WordPress integration
Three routing contexts
Choose the route facade for the context you are targeting:
| Context | Route facade | Matching behavior |
|---|---|---|
| HTTP routes | WpStarter\Support\Facades\Route |
Request URL and HTTP method |
| WordPress content routes | WpStarter\Wordpress\Facades\Route |
Shortcode tag in the current singular post and HTTP method |
| WordPress admin routes | WpStarter\Wordpress\Admin\Facades\Route |
Registered admin menu screen and HTTP method |
WordPress content routes use the route URI as a shortcode tag and expose shortcode attributes as route parameters. Admin routes define menus and submenus with titles, capabilities, icons, and positions.
Views and responses
Alongside the standard ws_view() helper, WordPress response helpers let a controller target different parts of WordPress rendering:
wp_view()creates a full-page view response.content_view()creates a post-content view response.shortcode_view()creates a shortcode view response.ws_pass()lets WordPress continue handling the request.
Documentation
Use the Laravel documentation matching the version mapping above as a starting point: Laravel 8.x for WpStarter 1.x and Laravel 12.x for WpStarter 2.x. Adapt namespaces and helper names, and verify WordPress-specific behavior against the installed WpStarter source.
Guidance for coding agents and a source map are available in AGENTS.md.
License
WpStarter is open-source software licensed under the MIT license.