Skip to content

2. Installation

ArachnidsGrip edited this page Apr 15, 2019 · 1 revision

1. Install w.eloquent

Via composer create-project

composer create-project es02/w.eloquent your_folder --prefer-dist

Via download

Download lastest version and run composer install

2. Create the .env file.

For local environment: .env.local.php

For production environment: .env.php

These files shouldn't be versioned.

<?php
return array(
        
	// these are required

	// if the .env.local.php is present the environment will be set to 'local'
	// by default, but you can set a personal environment configuration for some
	// part of the application
	'APP_ENV'     => 'local',

	'APP_THEME'   => 'base',

	'DB_NAME'     => 'weloquent',
	'DB_USER'     => 'root',
	'DB_PASSWORD' => '',
	'DB_HOST'     => 'localhost',
	'DB_PREFIX'   => 'wp_',
	'WP_HOME'     => 'http://localhost/weloquent',
	'WP_SITEURL'  => 'http://localhost/weloquent/cms',

	// from now on make the variables you want

	'my-private-key' => 'foo',

);

3. Install Wordpress

  1. Access your home url and install Wordpress.
  2. Login on admin panel and set up the theme, menus and permalinks.

You are done!

Configuration

Go to src/bootstrap/shared.php and set your unique keys and salts.

Set up your constants and variables on src/bootstrap/{environment}.php.

Everything is good to go, but spend some time on files inside of src/themes/your-theme/app/config/*.

The folders inside src/storage/* should be writable.

Optimizations

To access the admin session with a most appealing url. Add these instructions to your .htaccess. Now you can go to http://yoursite.com/cms

# BEGIN w.eloquent
<IfModule mod_rewrite.c>
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RedirectMatch 301 (.*)/cms/$ $1/cms/wp-admin
</IfModule>
# END w.eloquent

To combine classes and pre-render views run: php wel optimize --force.

To get a deeper understanding about w.eloquent see the Page life cycle on wiki.