PHPackages                             locomotivemtl/wordpress-boilerplate - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. locomotivemtl/wordpress-boilerplate

ActiveProject[Utility &amp; Helpers](/categories/utility)

locomotivemtl/wordpress-boilerplate
===================================

A modern WordPress project boilerplate.

16210[3 issues](https://github.com/locomotivemtl/wordpress-boilerplate/issues)PHP

Since Oct 18Pushed 1y ago13 watchersCompare

[ Source](https://github.com/locomotivemtl/wordpress-boilerplate)[ Packagist](https://packagist.org/packages/locomotivemtl/wordpress-boilerplate)[ RSS](/packages/locomotivemtl-wordpress-boilerplate/feed)WikiDiscussions main Synced 2mo ago

READMEChangelogDependenciesVersions (2)Used By (0)

🚂 WordPress Project Boilerplate
===============================

[](#-wordpress-project-boilerplate)

A quick and opinionated WordPress boilerplate with Composer, an easier configuration, and an improved folder structure.

> This boilerplate is based on [wp-jazz/wp-project-skeleton](https://github.com/wp-jazz/wp-project-skeleton)which is derived from [Bedrock](https://github.com/roots/bedrock).
>
> If you have the capability, please consider [sponsoring Roots](https://github.com/sponsors/roots).

Overview
--------

[](#overview)

This boilerplate assumes you are familiar with [wp-jazz/wp-project-skeleton](https://github.com/wp-jazz/wp-project-skeleton)and [Bedrock](https://docs.roots.io/bedrock/master/installation/).

Differences with [wp-jazz/wp-project-skeleton](https://github.com/wp-jazz/wp-project-skeleton):

- The *Web root directory* is `www` instead of `public`.
- Includes a copy of [`wp-ajax.php`](www/wp-ajax.php), a near-identical copy of WordPress' [`admin-ajax.php`](https://github.com/WordPress/WordPress/blob/6.1.0/wp-admin/admin-ajax.php).
- Prepared for integration with:
    - [Activity Log](https://github.com/pojome/activity-log) — Plugin to monitor and log all changes and activities.
    - [Advanced Custom Fields Pro](https://advancedcustomfields.com) — Plugin to allow adding extra content fields.
    - [Ecocide](https://github.com/mcaskill/wp-ecocide) — Library to disable basic features of WordPress.
    - [Gravity Forms](https://gravityforms.com) — Plugin to allow building custom forms.
    - [Polylang Pro](https://polylang.pro) — Plugin to support multilingual content.
- Includes copies of WordPress databases:
    - Unilingual (English)
    - Multilingual (English and French)

Requirements
------------

[](#requirements)

- PHP &gt;= 7.4
- Composer ([Installation](https://getcomposer.org/doc/00-intro.md#installation-linux-unix-osx))
- Active licenses for Advanced Custom Fields Pro, Gravity Forms, and Polylang Pro.

Installation
------------

[](#installation)

1. Create a new project:

    ```
    composer create-project locomotivemtl/wordpress-boilerplate
    ```

    Note that installation of Composer dependencies will fail because of the premium WordPress plugins that require license keys to be defined.

    Alternatively, clone the repository:

    ```
    git clone https://github.com/locomotivemtl/wordpress-boilerplate.git .
    rm -rf .git
    git init
    git add -A
    git commit -m "Initial commit"
    ```

    Or add the repository as a remote:

    ```
    git remote add boilerplate https://github.com/locomotivemtl/wordpress-boilerplate.git
    git fetch boilerplate main
    git merge boilerplate/main
    ```
2. Update environment variables in the `.env` file.

    Wrap values that may contain non-alphanumeric characters with quotes, or they may be incorrectly parsed.

    - Database variables:
        - `DB_NAME` — Database name
        - `DB_USER` — Database user
        - `DB_PASSWORD` — Database password
        - `DB_HOST` — Database host
        - Optionally, you can define `DATABASE_URL` for using a DSN instead of using the variables above (e.g. `mysql://user:password@127.0.0.1:3306/db_name`)
    - `WP_DEVELOPMENT_MODE` — Set the development mode (`all` for development or empty string for production)
    - `WP_ENVIRONMENT_TYPE` — Set to environment (`development`, `staging`, `production`)
    - `WP_HOME` — Full URL to WordPress home ()
    - `WP_SITEURL` — Avoid editing this variable. Full URL to WordPress including subdirectory ()
    - `ACF_PRO_KEY`, `GRAVITY_FORMS_KEY`, `POLYLANG_PRO_KEY` — Premium plugin license keys.
    - `AUTH_KEY`, `SECURE_AUTH_KEY`, `LOGGED_IN_KEY`, `NONCE_KEY`, `AUTH_SALT`, `SECURE_AUTH_SALT`, `LOGGED_IN_SALT`, `NONCE_SALT`
        - Generate with [wp-cli-dotenv-command](https://github.com/aaemnnosttv/wp-cli-dotenv-command)
        - Generate with [our WordPress salts generator](https://roots.io/salts.html)
3. Supply Composer with credentials for authenticating the installation of Polylang Pro:

    This step is necessary because Polylang Pro uses [Easy Digital Downloads](https://easydigitaldownloads.com/) (EDD) for distribution.

    ```
    composer config [--global] --editor --auth
    ```

    ```
    {
        "http-basic": {
            "polylang.pro": {
                "username": "username",
                "password": "password"
            }
        }
    }
    ```
4. Add plugin(s) in `www/plugins` and `www/mu-plugins`, and theme(s) in `www/themes` either:

    - as you would for a normal WordPress site (add an exception to the `.gitignore` if you want to index them)
    - or as Composer dependencies.
5. Most projects use pretty permalinks. This requires a `.htaccess` file on Apache servers. This file is not indexed in Git since it can contain environment-specific requirements. To create or update the file (and update rewrite rules in the database):

    ```
    wp rewrite flush --hard
    ```
6. Set the document root on your Web server to Jazz's `www` folder: `/path/to/site/www/`.
7. Access WordPress admin at `https://example.com/wordpress/wp-admin/`.

If you choose to use one of the starting databases, you will need to change the following:

- Replace the base URI:
    - `example.test`
- Add your license keys:
    - `acf_pro_license`
    - `rg_gforms_key`
    - `rg_gforms_captcha_public_key`
    - `rg_gforms_captcha_private_key`

Contributing
------------

[](#contributing)

Contributions are welcome from everyone. We have [contributing guidelines](CONTRIBUTING.md)to help you get started.

Acknowledgements
----------------

[](#acknowledgements)

This boilerplate is based on the solid work of many that have come before me, including:

- [Bedrock](https://github.com/roots/bedrock)
- [wp-jazz/wp-project-skeleton](https://github.com/wp-jazz/wp-project-skeleton)

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance24

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community17

Small or concentrated contributor base

Maturity43

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 63.6% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/cfb071c0ff7ce9500c528a003a2c53124248debc3e5bf367c17f89f5e6136125?d=identicon)[mducharme](/maintainers/mducharme)

---

Top Contributors

[![mcaskill](https://avatars.githubusercontent.com/u/29353?v=4)](https://github.com/mcaskill "mcaskill (14 commits)")[![dominiclord](https://avatars.githubusercontent.com/u/1775204?v=4)](https://github.com/dominiclord "dominiclord (7 commits)")[![devenini](https://avatars.githubusercontent.com/u/19838822?v=4)](https://github.com/devenini "devenini (1 commits)")

### Embed Badge

![Health badge](/badges/locomotivemtl-wordpress-boilerplate/health.svg)

```
[![Health](https://phpackages.com/badges/locomotivemtl-wordpress-boilerplate/health.svg)](https://phpackages.com/packages/locomotivemtl-wordpress-boilerplate)
```

###  Alternatives

[efriandika/laravel-settings

Laravel 5 Persistent Settings

6039.6k1](/packages/efriandika-laravel-settings)[saeedpooyanfar/laravel-annotation

Laravel #\[Annotation\]

182.7k](/packages/saeedpooyanfar-laravel-annotation)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
