PHPackages                             akirk/wp-app - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Framework](/categories/framework)
4. /
5. akirk/wp-app

ActiveLibrary[Framework](/categories/framework)

akirk/wp-app
============

A lightweight framework for building web applications on WordPress with routing, admin bar integration, and theme isolation

v1.1.0(3mo ago)2531GPL-2.0-or-laterPHPPHP &gt;=7.4

Since Jan 23Pushed 1mo agoCompare

[ Source](https://github.com/akirk/wp-app)[ Packagist](https://packagist.org/packages/akirk/wp-app)[ RSS](/packages/akirk-wp-app/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (2)Dependencies (3)Versions (3)Used By (1)

WpApp Framework
===============

[](#wpapp-framework)

Build modern web applications on WordPress with routing, admin bar integration, and theme isolation.

Why WordPress for Web Applications?
-----------------------------------

[](#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 &amp; 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

Try it Now
----------

[](#try-it-now)

Try the examples instantly in your browser with WordPress Playground:

- [Minimal App](https://playground.wordpress.net/?blueprint-url=https://raw.githubusercontent.com/akirk/wp-app/main/blueprints/minimal-app.json) - The simplest possible WpApp
- [Community App](https://playground.wordpress.net/?blueprint-url=https://raw.githubusercontent.com/akirk/wp-app/main/blueprints/community-app.json) - Full-featured example with database, REST API, and admin integration

Features
--------

[](#features)

- **URL Routing** - Pattern-based routing with WordPress rewrite rules
- **Theme Isolation** - Clean HTML output separate from your WordPress theme
- **Admin Bar Integration** - WordPress-style navigation for your app
- **Access Control** - WordPress capability-based authentication
- **BaseApp Pattern** - Structured architecture for complex applications
- **BaseStorage Pattern** - Database abstraction with schema management using `dbDelta`

Quick start
-----------

[](#quick-start)

You can use this command to scaffold your new plugin:

```
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 []:
URL path [my-app]:

Setup type:
  [1] Minimal - simple WpApp setup
  [2] Full - with BaseApp structure
Choose [1]:

✓ Updated plugin-name.php
✓ Updated templates/index.php
✓ Renamed plugin-name.php to my-app.php
✓ Removed src/ directory (not needed for minimal setup)
✓ Updated composer.json
✓ 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. Activate the plugin in WordPress
    2. Visit /my-app/ to see your app

```

Which gives you something like this:

[![create-wp-app](https://private-user-images.githubusercontent.com/203408/542788854-0a7cfabd-5cd9-40a4-bb2f-2b45d3c57e34.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NzU0NDkyNDgsIm5iZiI6MTc3NTQ0ODk0OCwicGF0aCI6Ii8yMDM0MDgvNTQyNzg4ODU0LTBhN2NmYWJkLTVjZDktNDBhNC1iYjJmLTJiNDVkM2M1N2UzNC5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjYwNDA2JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI2MDQwNlQwNDE1NDhaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT0yNjZlN2U3MmYxNDQ4MmQzNDQ1MzBhNGY1ZjE5YjUzN2VhMjVkMGYxNTUyY2FlODg2NzNkY2UwZWQyZWIyNTMxJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.2gsFkgwN46IiAdsuxGlAmY2jQZeVTuwSFIIn-nBdgp0)](https://private-user-images.githubusercontent.com/203408/542788854-0a7cfabd-5cd9-40a4-bb2f-2b45d3c57e34.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NzU0NDkyNDgsIm5iZiI6MTc3NTQ0ODk0OCwicGF0aCI6Ii8yMDM0MDgvNTQyNzg4ODU0LTBhN2NmYWJkLTVjZDktNDBhNC1iYjJmLTJiNDVkM2M1N2UzNC5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjYwNDA2JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI2MDQwNlQwNDE1NDhaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT0yNjZlN2U3MmYxNDQ4MmQzNDQ1MzBhNGY1ZjE5YjUzN2VhMjVkMGYxNTUyY2FlODg2NzNkY2UwZWQyZWIyNTMxJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.2gsFkgwN46IiAdsuxGlAmY2jQZeVTuwSFIIn-nBdgp0)Which you can then build on by adding your own routes, modify templates, etc.

Installation
------------

[](#installation)

```
composer require akirk/wp-app
```

Quick Start
-----------

[](#quick-start-1)

The simplest possible WpApp requires just 3 lines:

```
