Skip to content

1. Installation

alex_prokopenko edited this page Dec 1, 2017 · 11 revisions

Requirements

Installation

  1. Create a new project in a folder for your site:

    composer create-project justcoded/wordpress-starter your-project-folder-name or php composer.phar create-project justcoded/wordpress-starter your-project-folder-name

  2. Set important environment variables in .env file:

  • DB_NAME - Database name
  • DB_USER - Database user
  • DB_PASSWORD - Database password
  • DB_HOST - Database host
  • WP_HOME - Full URL to WordPress home (http://example.com)

You can read more about available variables on Environment variables Page.

  1. Run WordPress install as usual by accessing your site at http://example.com/

  2. Enjoy!

Theme boilerplate

If you want to use our Theme Boilerplate for your project you can generate a new theme inside /wp-content/themes folder with simple command:

composer wp:theme <folder-name> [-t="My Theme"] [-ns="ClientName"] [-dir="wp-content/themes"] [-s, silent install]
	
	or
	
php composer.phar wp:theme <folder-name> [-t="My Theme"] [-ns="ClientName"] [-dir="wp-content/themes"] [-s, silent install]

If you forgot the syntax of the command or want to know more about command options you can just call command without any options to get command help:

composer wp:theme
Clone this wiki locally