Skip to content

akirk/create-wp-app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

create-wp-app

Scaffold a WordPress plugin powered by WpApp.

Usage

composer create-project akirk/create-wp-app my-plugin

This will prompt you for:

  • Plugin name — Display name for your plugin
  • Namespace — PHP namespace for your classes
  • Author — Plugin author (optional)
  • URL path — Where your app lives (e.g., /my-plugin/)
  • Setup type — Minimal or Full (with BaseApp structure)

Screenshot

create-wp-app

Setup Types

Minimal

A simple setup with just the essentials:

my-plugin/
├── my-plugin.php      # Main plugin file with WpApp initialization
├── templates/
│   └── index.php      # Your app's home page
├── composer.json
└── .gitignore

Full

A structured setup for larger applications:

my-plugin/
├── my-plugin.php      # Main plugin file
├── src/
│   └── App.php        # BaseApp subclass with routes, menu, database hooks
├── templates/
│   └── index.php
├── composer.json
└── .gitignore

Non-Interactive Mode

For CI/CD or scripting, use environment variables:

WP_APP_PLUGIN_NAME="My App" \
WP_APP_NAMESPACE="MyApp" \
WP_APP_AUTHOR="Your Name" \
WP_APP_URL_PATH="my-app" \
WP_APP_SETUP_TYPE="1" \
composer create-project --no-interaction akirk/create-wp-app my-plugin

After Setup

  1. Move the folder to wp-content/plugins/ (if not already there)
  2. Activate the plugin in WordPress
  3. Visit your app at the URL path you configured

Documentation

See the WpApp documentation for details on routing, the masterbar, access control, and more.

License

GPL-2.0-or-later

About

Scaffold a WordPress app

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages