Skip to main content
  1. All Posts/


Tools Open Source PHP WordPress

WP Site Boilerplate

WP Site Boilerplate a starter project for sites using WordPress based on modern development tools.
Go to get started section to see how work with WP Site Boilerplate.


  • Dependency management using composer
  • Clean project structure

Get started

Clone WP Site Boilerplate from GitHub
git clone mysite
Go into directory
cd mysite
Copy dotenv and fill with your properties
cp .env.example .env
Install dependencies and download WordPress
composer install
Install theme from WordPress theme directory
composer require wpackagist-theme/twentyseventeen
Generate config and install WordPress using .env variables with one command. If database do not exist this task will try to create it. Before executing make sure your database user provided in .env file can create database or create database by yourself.
./vendor/bin/phing wp:init
Your wp-config.php file will be generated in current directory. Open it and add this configuration.

define('WP_HOME', '');
define('WP_SITEURL',  WP_HOME . '/wordpress/');
define('WP_CONTENT_DIR', realpath( dirname( __FILE__ ) . '/content' ));
define('WP_CONTENT_URL', WP_HOME . '/content');

That’s all you can start working with your WordPress!

Project structure

├── content       // Themes, plugins, uploads etc. directory
|   ├── themes
|   ├── plugins
|   └── uploads
├── wordpress     // WordPress directory
├── vendor        // Dependencies directory
├── .env          // Dotenv file with project variables
├── build.xml     // Task manager file
├── composer.json // Dependency management file
├── index.php     // Default WordPress index.php file pointed to wordpress directory


I’m really excited that you are interested in contributing to WP Site Boilerplate. Do not hesitate to make pull request.
Thank you to all the people who already contributed to WP Site Boilerplate!


The project is licensed under the GNU GPLv2 (or later).
Copyright (c) 2017-present, Motivast