Skip to main content

Setup

Getting settled in

Setup

Let's have our first lookie ~

Installation

Installing Morningmedley can easily be done using composer.

You can either install the framework into an existing project or plugin OR you can use composer create-project to quickly get started.

Creating a theme (or plugin)

Navigate to your /themes or /plugins directory within WordPress and then run:

composer create-project morningmedley/app project-name

This creates a new Morningmedley app here called "project-name".

note

If this app is created within a directory called themes then theme relevant files will be created. If, instead, the parent directory is called plugins then plugin files will be created.

Next edit style.css or plugin.php to match your project.

Installing the framework

composer require morningmedley/medley

After installing Morningmedley, please make sure that your file structure is valid by referencing Project Structure

Getting Started

Initialize the Application

composer create-project morningmedley/app should have handled this for you. If not, read along:

First boot up composers autoloader and then require app.php which should be located in /bootstrap/.

functions.php
<?php

require __DIR__ . "/vendor/autoload.php";
require __DIR__ . "/bootstrap/app.php"

Then create and return the Application from app.php:

bootstrap/app.php
<?php

return MorningMedley::configure(dirname(__FILE__, 2))
->create();

warning

At this stage you might need to manually create a couple necessary folders.

mkdir storage
mkdir storage/framework
mkdir storage/framework/views
mkdir storage/logs

Each module of Morningmedley is described in Building your app.