PHPackages                             wp-composer/wordpress-project - 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. wp-composer/wordpress-project

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

wp-composer/wordpress-project
=============================

Project template for Wordpress 5 projects with Composer

5.x-dev(4y ago)122MITPHPPHP &gt;=7.4

Since Jul 20Pushed 4y ago1 watchersCompare

[ Source](https://github.com/wp-composer/wordpress-project)[ Packagist](https://packagist.org/packages/wp-composer/wordpress-project)[ GitHub Sponsors](https://github.com/BramDriesen)[ RSS](/packages/wp-composer-wordpress-project/feed)WikiDiscussions 5.x Synced 1w ago

READMEChangelogDependencies (5)Versions (1)Used By (0)

Composer template for Wordpress projects
========================================

[](#composer-template-for-wordpress-projects)

This project template provides a starter kit for managing your site dependencies with [Composer](https://getcomposer.org/).

Usage
-----

[](#usage)

First you need to [install Composer](https://getcomposer.org/doc/00-intro.md#installation-linux-unix-osx).

> Note: The instructions below refer to the [global Composer installation](https://getcomposer.org/doc/00-intro.md#globally). You might need to replace `composer` with `php composer.phar` (or similar) for your setup.

After that you can create the project:

```
composer create-project wp-composer/wordpress-project:5.x-dev some-dir --no-interaction
```

With `composer require ...` you can download new dependencies to your installation.

```
cd some-dir
composer require wpackagist-plugin/really-simple-ssl
```

What does the template do?
--------------------------

[](#what-does-the-template-do)

When installing the given `composer.json` some tasks are taken care of:

- Wordpress will be installed in the `web`-directory.
- Autoloader is implemented to use the generated composer autoloader in `vendor/autoload.php`
- Plugins (packages of type `wordpress-plugin`) will be placed in `web/wp-content/plugins/`
- Plugins (packages of type `wordpress-plugin`) will be placed in `web/wp-content/mu-plugins/`
- Theme (packages of type `wordpress-muplugin`) will be placed in `web/wp-content/themes/`
- Creates environment variables based on your .env file. See [.env.example](.env.example).

Updating Wordpress Core
-----------------------

[](#updating-wordpress-core)

This project will attempt to keep all of your Wordpress Core files up-to-date.

Follow the steps below to update your core files.

1. Run `composer update "johnpbloch/wordpress-core" --with-dependencies` to update Wordpress Core and its dependencies.
2. Run `git diff` to determine if any custom changes are reverted.
    1. Commit everything all together in a single commit, so `web` will remain in sync with the `core` when checking out branches or running `git bisect`.
    2. In the event that there are non-trivial conflicts in step 2, you may wish to perform these steps on a branch, and use `git merge` to combine the updated core files with your customized files. This facilitates the use of a [three-way merge tool such as kdiff3](http://www.gitshah.com/2010/12/how-to-setup-kdiff-as-diff-tool-for-git.html). This setup is not necessary if your changes are simple; keeping all of your modifications at the beginning or end of the file is a good strategy to keep merges easy.

FAQ
---

[](#faq)

### Should I commit the plugins or themes I download?

[](#should-i-commit-the-plugins-or-themes-i-download)

Composer recommends **no**. They provide [argumentation against but also workrounds if a project decides to do it anyway](https://getcomposer.org/doc/faqs/should-i-commit-the-dependencies-in-my-vendor-directory.md).

### How can I apply patches to downloaded plugins?

[](#how-can-i-apply-patches-to-downloaded-plugins)

If you need to apply patches (depending on the project being modified, a pull request is often a better solution), you can do so with the [composer-patches](https://github.com/cweagans/composer-patches) plugin.

To add a patch to Wordpress plugin really-simple-ssl insert the patches section in the extra section of composer.json:

```
"extra": {
    "patches": {
        "wpackagist-plugin/really-simple-ssl": {
            "Patch description": "URL or local path to patch"
        }
    }
}
```

This will also work for Wordpress core patches.

```
"extra": {
    "patches": {
        "johnpbloch/wordpress-core" : {
             "Issue #1486: Alter how Twenty Twenty-One sets up Dark Mode support.": "https://patch-diff.githubusercontent.com/raw/WordPress/wordpress-develop/pull/1486.patch"
        }
    }
}
```

### How do I specify a PHP version ?

[](#how-do-i-specify-a-php-version-)

This project supports PHP 7.4 as minimum version (see [Wordpress requirements](https://wordpress.org/about/requirements/)), however it's possible that a `composer update` will upgrade some package that will then require PHP 7.4+.

To prevent this you can add this code to specify the PHP version you want to use in the `config` section of `composer.json`:

```
"config": {
    "sort-packages": true,
    "platform": {
        "php": "7.4.21"
    }
},
```

###  Health Score

19

—

LowBetter than 10% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity35

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% 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.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

1763d ago

### Community

Maintainers

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

---

Top Contributors

[![BramDriesen](https://avatars.githubusercontent.com/u/12573202?v=4)](https://github.com/BramDriesen "BramDriesen (5 commits)")

### Embed Badge

![Health badge](/badges/wp-composer-wordpress-project/health.svg)

```
[![Health](https://phpackages.com/badges/wp-composer-wordpress-project/health.svg)](https://phpackages.com/packages/wp-composer-wordpress-project)
```

###  Alternatives

[roots/bedrock

WordPress boilerplate with Composer, easier configuration, and an improved folder structure

6.5k441.8k2](/packages/roots-bedrock)[johnpbloch/wordpress

WordPress is open source software you can use to create a beautiful website, blog, or app.

6079.5M471](/packages/johnpbloch-wordpress)[wodby/wordpress-composer

Project template for WordPress projects with composer

691.1k](/packages/wodby-wordpress-composer)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)

PHPackages © 2026

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