A fork of roots/bedrock tailored for OnePix.
This fork is designed as a foundation for developing WordPress themes and plugins. All project code should be located in the web/app/{plugins,themes} directory.
A single BOP-based project can include multiple related themes and plugins under development. In such cases, BOP serves as the foundation for a monorepo. Component code can be included directly in the monorepo or added as Git submodules.
- GitHub Actions have been removed since we use GitLab CI.
- Docker has been added for easy local setup.
- The Pint package has been removed because each theme or plugin under development includes its own static analysis tools.
- Run
composer create-project onepix/bedrockto install BOP. - Create an
.envfile by runningcp .env.example .env. - Update the required variables in the
.envfile. - Start Docker with
docker-compose up -d.
- Copy your theme directory into
web/app/themes, or start developing a theme based on our template onepix/wordpress-template. - Add the theme directory to the
.gitignorefile under the section "Themes under development". - Commit the new code to the monorepo.
- Copy your plugin directory into
web/app/plugins, or start developing a plugin based on our template onepix/wordpress-template. - Add the plugin directory to the
.gitignorefile under the section "Plugins under development". - Commit the new code to the monorepo.
To add plugins as project dependencies, use Composer and WPackagist. WPackagist is already configured in the project's composer.json. All plugins installed this way will automatically be placed in the web/app/plugins directory.
You can find available plugins on the WPackagist search page. For example, to install the WooCommerce plugin, run: composer require wpackagist-plugin/woocommerce
This will:
- Add the plugin to
composer.json. - Install it.
- Place it in the
web/app/plugins/woocommercedirectory.
The process for adding themes is the same as for plugins. By default, the latest official WordPress theme is installed, but you can choose another theme if you're not developing your own.
This is especially useful when developing WooCommerce plugins. For example, you can install the official WooCommerce theme "Storefront" alongside the WooCommerce plugin by running: composer require wpackagist-theme/storefront