Skip to main content
  1. All Posts/

bedrock-multisite-skeleton

Tools Open Source PHP WordPress

Bedrock Multisite Skeleton

A WordPress Bedrock multisite skeleton. This project is trying to simplify the way we’re setting up a new WordPress project. Don’t repeat yourself.


Much of the philosophy behind Bedrock is inspired by the Twelve-Factor App methodology including the WordPress specific version.

Features

  • Dependency management with Composer
  • Better folder structure
  • Easy WordPress configuration with environment specific files
  • Environment variables with Dotenv
  • Whoops is a nice little library that helps you deal with errors and exceptions in a less painful way.
  • Autoloader for mu-plugins (use regular plugins as mu-plugins)
  • Debug Bar Adds a debug menu to the admin bar that shows query, cache, and other helpful debugging information.
  • Developer A plugin, which helps WordPress developers develop.
  • [Stage Switcher] Detects all the enviroments in WordPress.
  • MultisiteDirectoryResolver Adds filters that correct directory paths in a WordPress multisite install with the WordPress installation in a custom subfolder.
  • Koodimonni composer lang support

Plugins & Themes

We are using WordPress Packagist for plugins. To add a plugin from the WordPress Plugin Directory add the to the required array in the composer.json file. Specify them with wpackagist-plugin following by the plugin slug name. Example below.

"wpackagist-plugin/plugin-name": "~1.0.1"

Please note that this also works with themes and WordPress multi-site plugins.

Requirements

  • PHP >= 5.4

Installation

Install Bedrock Multisite by issuing the Composer create-project command in your terminal:

  1. composer create-project gwa/bedrock-multisite-skeleton
  2. Copy .env.example to .env and update environment variables:
  • DB_NAME – Database name
  • DB_USER – Database user
  • DB_PASSWORD – Database password
  • DB_HOST – Database host
  • WP_ENV – Set to environment (development, staging, production)
  • WP_HOME – Full URL to WordPress home (http://example.com)
  • WP_SITEURL – Full URL to WordPress including subdirectory (http://example.com/wp)
  1. Access WP admin at http://example.com/wp/wp-admin

Read more about setting up Bedrock Multisite on our installation documentation page.

Deploys

Any other deployment method can be used as well with one requirement:
composer install must be run as part of the deploy process.

Documentation

  • Folder structure
  • Configuration files
  • Environment variables
  • Composer
  • wp-cron
  • mu-plugins autoloader

Contributing

Contributions are welcome from everyone. We have contributing guidelines to help you get started.

Community

Keep track of development and community news.