Get Started

What is WordPress MVC?
WordPress MVC (WPMVC) is a development framework for building customized themes and plugins in Wordpress
Unlike any other framework, WordPress MVC is designed to facilitate, standardize and speed up the development process of enterprise-level applications. The implementation of scaffolding, MVC design pattern, dependency injection and other features make this the best and most friendly framework to use for WordPress development.
Requirements
Before you try it out, make sure your development and production (live) environments have the proper requirements in place.
Production (live):
- Php >= 5.4
- WordPress >= 4
Development:
Installation
First, you will need to mount a copy of WordPress on your local webserver.
Then, define what type of application you are going to develop. If it is a Theme the app would be located at wp-content/themes/your-app-name
, and if it is a Plugin it would be at wp-content/plugins/your-app-name
.
Via composer create-project
To create and install the project using composer, use your OS command line application of choice and change directory to the "themes" or "plugins" WordPress subfolder. For example:
cd [wordpress root path]/wp-content/plugins
Then run composer's create project command:
composer create-project 10quality/wpmvc {your-app-name}
{your-app-name}
To follow with WordPress standards, replace {your-app-name} with your App's name in lower case and with words separated with dashes. This should also be your text-domain identifier for localization.Composer will create a subfolder with the name specified as {your-app-name}
and will install WordPress MVC in it.
Change directory to this subfolder, for example:
cd [wordpress root path]/wp-content/plugins/{your-app-name}
And run the setup command:
php ayuco setup
A setup wizard (in the command line) will walk you through to configure the basics of your project.
When finished type the following command to install all building and compiling dependencies:
npm install
Via manual download
Create a folder for where your project will be located. If it is a Theme it should be located at wp-content/themes/your-folder-name
, and if it is a Plugin it should at wp-content/plugins/your-folder-name
.
Pro Tip
Name your project's folder in lower case and with no whitespaces, use dashes instead.Download or clone the latest release of WordPress MVC into the folder created.
Using your OS command line application of choice, change directory to the project's folder created previously (where WordPress MVC was copied or cloned). Type and execute the following command to install WordPress MVC PHP dependencies and libraries:
composer install --no-plugins
Type and execute the following command to install WordPress MVC front-end and deployment dependencies:
npm install
Setup
Using your OS command line application of choice, change directory to the project's folder previously created (where WordPress MVC was copied or cloned). Type and execute the following command to set up your project.
php ayuco setup
A setup wizard (in the command line) will walk you through to configure the basics of your project.
Update The Framework
It is recommended to update the framework dependencies once in a while, for example, before launching a new release. To update the dependencies run the following commands:
composer update --no-plugins
npm update