Skip to Content
🎉 WpMVC 2.0 is released! Now compatible with PHP 7.4 to 8.5. Read the guide →
DocumentationInstallation

Installation

WpMVC is a modern WordPress plugin framework engineered for architectural precision and developer efficiency. By integrating professional PHP patterns and a comprehensive CLI, WpMVC enables the rapid development of high-performance, maintainable plugins.

To get started with WpMVC, ensure you have Composer and PHP 7.4 installed on your system.

To ensure seamless compatibility across PHP 7.4 to 8.5, it is recommended to maintain PHP 7.4 as your system’s primary version during the installation and build process. Initializing dependencies on higher PHP versions can introduce compatibility regression in environments running PHP 7.4.

Architect Your Plugin

Scaffold a new plugin project using Composer:

composer create-project wpmvc/wpmvc plugin-name

Replace plugin-name with your desired directory name.

Initialize the Environment

Navigate to your project directory and execute the interactive setup utility:

cd plugin-name php artisan app:setup

Setup Prompts Explained

The setup utility handles the primary configuration of your application:

  • Plugin Name: The formal display name of your plugin (e.g., OptinCraft Pro).
  • Plugin Namespace: The root PHP namespace for your codebase (e.g., OptinCraftPro).
  • API Namespace: The unique URL prefix for your REST API endpoints (e.g., optincraft-pro).

Initialization Successful. Your plugin is now scaffolded and ready for development.


Next Steps

Now that your plugin is ready, explore the core components of the framework:

Artisan CLI

Artisan is the primary interface for managing your WpMVC application. Execute it to list all available commands:

php artisan

Routing & Controllers

Define your API endpoints and organize your logic:

Database & ORM

Manage your data with a fluent query builder and Eloquent models:


Maintenance

Regenerating Dependencies

WpMVC uses a custom build process to handle namespace isolation. To re-generate your vendor folder or update dependencies, do not use composer install. Instead, use:

composer setup
Last updated on