Installation
Welcome to WpMVC — a modern WordPress plugin framework that brings simplicity, structure, and speed to plugin development. With expressive syntax and a rich set of tools, WpMVC helps developers build high-quality plugins effortlessly.
Create a New Plugin
Start by scaffolding your plugin using Composer:
composer create-project wpmvc/wpmvc plugin-nameReplace plugin-name with your desired plugin folder name.
Navigate to Your Plugin Directory
cd plugin-nameRun the Setup Wizard
Configure your plugin details interactively:
php artisan app:setupSetup Prompts Explained
When prompted:
-
Enter Plugin: This is the display name of your plugin. Example:
Plugin Name -
Enter plugin namespace: This is the PHP namespace used throughout your codebase. Example:
PluginName -
Enter plugin API namespace: This is the namespace for your REST API endpoints. Example:
plugin-name
✅ That’s it — your plugin is now scaffolded and ready to build!
Artisan Command
Run this command to see all available command lists:
php artisanRouting
Check out the Routing Documentation for more details.
Database
Check out the Database Documentation for more details.
Regenerate Vendor Directory
To re-generate the vendor folder, do not use composer install or php artisan app:setup.
Instead, use:
composer setup