Skip to content
WordPress boilerplate for vanilla WordPress installations with modern development tools and src directory for theme assets.
PHP Dockerfile Other
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
public/wp-content/mu-plugins
scripts
util
.gitignore
README.md
composer.json
composer.lock
deploy.php
docker-compose.development.yml
phpcs.xml
wp-cli.yml

README.md

WordPress Vanilla Boilerplate

WordPress boilerplate for vanilla WordPress installations with modern development Tools (Docker, WP CLI, PHPCS).

Quick Links

Features

Gaambos Vanilla WP takes vanilla WordPress and enhances it through the following features:

Requirements

Installation

  1. Create a new project
    Clone git repository
    $ git clone git@github.com:gaambo/vanilla-wp.git website-dir
    $ cd website-dir && rm -rf .git
    $ git init
  2. Start Docker containers
    docker-compose -f "docker.compose.development.yml" up -d --build
  3. Install WordPress (See Wiki)
    $ .\util\wpcli.bat core download --path='./public'
    Then run .\util\wpcli.bat core install with the according arguments or just open up the website in your browser to start WordPress famous 5 minute installation.
  4. Install dependencies
    $ composer install
  5. Install Theme
    My _g Theme works perfectly with this boilerplate. I suggest you use this one:
    $ cd public/wp-content/themes/${themename}
    $ git clone git@github.com:gaambo/_g-wp-theme.git .
    $ rm -rf .git
    $ npm install
    $ composer install
    Then exclude the path in gitignore: !public/wp-content/themes/${themename}

All other themes can be installed as usual (unzip in public/wp-content/themes, upload via FTP,...). You can also use wpcli:

$ ./util/wpcli.sh plugin theme twentynineteen
  1. Install Core Functionality Plugin (optional)
    My Core Functionality Plugin works perfectly with this boilerplate. I suggst you use it to for complete site-projects to put all site-specific functionality in it:
    $ git clone git@github.com:gaambo/wp-core-functionality-plugin.git public/wp-content/mu-plugins/core-functionality
    $ rm -rf .git
    Then exclude the path in gitignore: !public/wp-content/mu-plugins/core-functionality
  2. Install plugins:
    $ ./util/wpcli.sh plugin install autodescription
  3. If developing a custom theme or plugin which you want to include in the repository exclude it in .gitignore.
  4. If developing a custom theme or plugin which you want to have PHP linting available include it in phpcs.xml via <include-pattern>PATH</include-pattern>.
  5. Set the document root on your webserver to the public folder: /path/to/site/public/
  6. Access WordPress admin at https://example.com/wp-admin/

Deployment

PHP Deployer in conjunction with gaambos WordPress recipes is used. A documentation of all available tasks can be found in the README.md of the package. The deploy.php is based on the default/vanilla deploy recipe from this package and edits localhost settings for setting document root and using Docker for WP CLI.

Before running any tasks you have to configure SSH acces to the hosts defined in util/hosts.yml via ~/.ssh/config.

Documentation

Documentation can be found in our GitHub wiki

Contributing

Contributions are welcome from everyone. Just open an issue or contact me.

You can’t perform that action at this time.