Skip to content
Cobblestone is heavily based on Bedrock which is a modern WordPress stack that helps you get started with the best development tools and project structure.
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.
build
config
public
.editorconfig
.env.example
.eslintignore
.eslintrc.json
.gitignore
.stylelintignore
.stylelintrc.json
MIGRATION.md
README.md
composer.json
composer.lock
docker-compose.development.yml
package-lock.json
package.json
phpcs.xml
wp-cli.yml

README.md

WordPress Cobblestone

Cobblestone is heavily based on Bedrock which is a modern WordPress stack that helps you get started with the best development tools and project structure.

For more Information about Bedrock see their website and the original readme.

We regularly sync changes from Bedrock to this repository and update WordPress versions.

Quick Links

Features

Cobblestone takes Bedrock and enhances it through the following features:

  • Docker Compose for local developing (and for making deployment easier) including Xdebug
  • A WP-CLI Docker container
  • JavaScript linting via ESLint configuration
  • PHP linting with PSR2 Standards via PHPCS
  • Different flavors for different development requirements
  • Deploying via Deployer (coming soon)
  • Snippets for often used tools and plugins (e.g. installing of WordPress premium plugins like ACF Pro)

Original Bedrock Features:

  • Dependency management with Composer
  • Easy WordPress configuration with environment specific files
  • Environment variables with Dotenv
  • Autoloader for mu-plugins (use regular plugins as mu-plugins)
  • Enhanced security (separated web root and secure passwords with wp-password-bcrypt)

Flavors

Cobblestone provides multiple "flavors" for different development requirements and use cases. These flavors are implemented as git branches and each has its own additionall information in the readme.

  • Default (master branch): A blank slate for any WordPress development without a theme, plugins or anything else. Just start from scratch.
  • Obsidian (obsidian branch): Cobblestone boilerplate combined with a boilerplate theme based on Timber making usage of Gulp with LibSass, Babel, PostCSS, BrowserSync etc. Perfect for custom developed themes and working with Advanced Custom Fields.

Requirements

Installation

  1. Create a new project
    a. Create composer project
    $ composer create-project gaambo/cobblestone
    b. Clone git repository
    $ git clone https://github.com/gaambo/cobblestone-wp website-dir
    $ cd website-dir && rm -rf .git
    $ git init
  2. Update environment variables in the .env file (or copy .env.example if not existing):
  • 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 (https://example.com)
  • WP_SITEURL - Full URL to WordPress including subdirectory (https://example.com/wp)
  • AUTH_KEY, SECURE_AUTH_KEY, LOGGED_IN_KEY, NONCE_KEY, AUTH_SALT, SECURE_AUTH_SALT, LOGGED_IN_SALT, NONCE_SALT
  1. Install dependencies
    $ composer install
    $ npm install
  2. Add theme(s) in public/app/themes/ as you would for a normal WordPress site. For installing themes and plugins from the WordPress repository see the Bedrock documentation about using composer for WordPress.
  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 JavaScript linting available exclude it in .eslintignore.
  5. If developing a custom theme or plugin which you want to have Style (CSS/SCSS) linting available exclude it in .stylelintignore.
  6. 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>.
  7. Set the document root on your webserver to Bedrock's web folder: /path/to/site/public/
  8. Access WordPress admin at https://example.com/wp/wp-admin/

Documentation

Cobblestone specific documentation can be found in our GitHub wiki Bedrock documentation is available at https://roots.io/bedrock/docs/.

Contributing

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

Bedrock has its own contributing guidelines.

Why the name?

Since Bedrock is also a Block in Minecraft I decided to name my boilerplate after a Block too: Cobblestone. Also: Play Minecraft, it's great!

Bedrock sponsors

As this boilerplate is heavily based on Bedrock I like to thank their team and their sponsors:

Help support our open-source development efforts by becoming a patron.

Kinsta KM Digital itineris

Community

Keep track of Bedrock development and community news.

You can’t perform that action at this time.