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.
We regularly sync changes from Bedrock to this repository and update WordPress versions.
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
- 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)
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.
- Create a new project
a. Create composer projectb. Clone git repository
$ composer create-project gaambo/cobblestone
$ git clone https://github.com/gaambo/cobblestone-wp website-dir $ cd website-dir && rm -rf .git $ git init
- Update environment variables in the
.envfile (or copy
.env.exampleif not existing):
DB_NAME- Database name
DB_USER- Database user
DB_PASSWORD- Database password
DB_HOST- Database host
WP_ENV- Set to environment (
WP_HOME- Full URL to WordPress home (https://example.com)
WP_SITEURL- Full URL to WordPress including subdirectory (https://example.com/wp)
- Install dependencies
$ composer install $ npm install
- 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.
- If developing a custom theme or plugin which you want to include in the repository exclude it in
- If developing a custom theme or plugin which you want to have Style (CSS/SCSS) linting available exclude it in
- If developing a custom theme or plugin which you want to have PHP linting available include it in
- Set the document root on your webserver to Bedrock's
- Access WordPress admin at
Contributions are welcome from everyone. Just open an issue or contact me.
Bedrock has its own contributing guidelines.
Why the name?
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.
Keep track of Bedrock development and community news.