akirk / wp-app
A framework to build frontend apps on WordPress with routing, admin bar integration, and theme isolation
Requires
- php: >=7.4
Requires (Dev)
- phpunit/phpunit: ^9.0
- squizlabs/php_codesniffer: ^3.7
- wp-coding-standards/wpcs: ^3.0
Suggests
None
Provides
None
Conflicts
None
Replaces
None
- dev-main
- v2.3.0
- v2.2.0
- v2.1.1
- v2.1.0
- v2.0.0
- v2.0.0-alpha.2
- v2.0.0-alpha.1
- v1.9.2
- v1.9.1
- v1.9.0
- v1.8.1
- v1.8.0
- v1.7.0
- v1.6.4
- v1.6.3
- v1.6.2
- v1.6.1
- v1.6.0
- v1.5.1
- v1.5.0
- v1.4.1
- v1.4.0
- v1.3.2
- v1.3.1
- v1.3.0
- 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.2
- v1.1.1
- v1.1.0
- v1.0.0
- dev-improve-settings-mobile-layout
- dev-fix-provider-asset-resolution
- dev-fix/dev-wp-app-provider-eligibility
- dev-improve-readme-navigation
- dev-fix/404-external-styles
- dev-wp-app-settings-icon-controls
- dev-app-doctor-command
- dev-icon-colors
- dev-feature/openstation-integration
- dev-docs/rest-access-defaults
- dev-add-client-side-encryption-runtime
- dev-fix-baseapp-translated-label-timing
- dev-rename-admin-bar-app-link
This package is auto-updated.
Last update: 2026-11-23 16:19:40 UTC
README
A framework to build frontend apps on WordPress, each with its own URL space and user interface.
Why? · Quick Start · Examples · WP Apps Site · Documentation · Manual Installation · Requirements
Quick Start
Scaffold a new plugin with one command:
composer create-project akirk/create-wp-app my-app
Which gives you this little wizard:
Creating WpApp plugin: my-app
----------------------------------------
Plugin name [My App]:
Namespace [MyApp]:
Author name []:
URL path [my-app]:
Setup type:
[m] Minimal - simple WpApp setup
[f] Full - with BaseApp structure
Choose [f]:
✓ Updated plugin-name.php
✓ Updated templates/index.php
✓ Updated src/App.php
✓ Renamed plugin-name.php to my-app.php
✓ Created .gitignore
✓ Updated composer.json
✓ Regenerated autoloader
✓ Updated README.md
✓ Cleaned up setup scripts
Done! Your plugin is ready.
Next steps:
Option A: Run locally with WordPress Playground
npx @wp-playground/cli@latest server --auto-mount=my-app --login
Option B: Install in WordPress
1. Move this folder to wp-content/plugins/
2. Activate the plugin in WordPress
3. Visit /my-app/ to see your app
Which gives you something like this:
The WP Apps Site
Visit wpapps.kirk.at for a visual introduction to the WP Apps concept and a catalog of apps you can run on your own WordPress, including a travel app, a cookbook, and a family wiki.
Examples
The examples are available in the wp-app-examples repository. Try them instantly in your browser with WordPress Playground:
- Minimal App — the smallest working app. Try in Playground.
- Community App — BaseApp, database storage, user progress tracking, REST endpoints, and admin integration. Try in Playground.
Why WordPress for Web Applications?
WordPress isn't just for blogs. It's a powerful foundation for web applications.
For developers:
- Built-in User Management - Authentication, roles, and permissions out of the box
- Admin Interface - Professional backend without building from scratch
- Security & Updates - Automatic security patches and proven practices
- Global Ready - Built-in i18n and multisite support
For users:
- Universal Hosting - Deploy anywhere WordPress runs, from shared hosting to cloud
- Familiar Environment - Manage your app alongside your existing WordPress site
Features
- Own URL Space, Private by Default - Each app owns a subdirectory of your WordPress site, such as
/my-app/, and handles the routes beneath it. App pages require login by default; apps can be fully public or combine public pages with routes protected by WordPress capabilities. See Routing and Access Control, including separate controls for REST data access. - A Blank Canvas for Your UI - App templates run independently of the active WordPress theme. Bring your own HTML, CSS, and JavaScript to control the layout, styling, and interactions while using WordPress users, data, and APIs. See Templates and Assets.
- Admin Bar Integration - WordPress-style navigation for your app
- Access Control - WordPress capability-based authentication
- Offline PWA Support - App-scoped manifests and service workers for installable apps
- BaseApp Pattern - Structured architecture for complex applications
- BaseStorage Pattern - Database abstraction with schema management using
dbDelta
Local Development
Run your plugin locally without a full WordPress installation:
npx @wp-playground/cli@latest server --auto-mount --login
This starts a local WordPress instance with your plugin mounted and activated.
Documentation
Use the documentation index to find guides by task.
- Start building: Getting Started, Tutorial, BaseApp Pattern
- Build pages: Routing, Templates, Assets, Gutenberg Content
- Customize the app: Configuration, Masterbar, Themes, Colors
- Work with data and integrations: Access Control, Abilities, Offline PWA, Encryption
Claude Code Integration
Get AI assistance for WpApp development in Claude Code:
/plugin marketplace add akirk/wp-app /plugin install wpapp@wp-app
Manual Installation
composer require akirk/wp-app
The simplest possible WpApp requires just 3 lines:
<?php /** * Plugin Name: Minimal App */ require_once __DIR__ . '/vendor/autoload.php'; use WpApp\WpApp; $app = new WpApp( __DIR__ . '/templates', 'minimal' ); $app->init();
Create templates/index.php:
<!DOCTYPE html> <html <?php wp_app_language_attributes(); ?>> <head> <title><?php wp_app_the_title( 'My App' ); ?></title> <?php wp_app_head(); ?> </head> <body> <?php wp_app_body_open(); ?> <h1>Welcome to My App!</h1> <?php wp_app_body_close(); ?> </body> </html>
Your app is now available at /minimal!
Requirements
- PHP 7.4 or higher
- WordPress 5.0 or higher
Tests and Coding Standards
Run the test suite and WordPress coding standards checks:
composer test
composer phpcs
License
GPL-2.0-or-later
For shared application shells, safe bootstrap, local data, offline caching, and durable operation queues, see Offline shells and outboxes.