PHPackages                             rvtraveller/composerize-wordpress - 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. rvtraveller/composerize-wordpress

ActiveComposer-plugin

rvtraveller/composerize-wordpress
=================================

Convert a non-Composer managed WordPress application into a Composer-managed application.

0.1.0(6y ago)172PHPPHP &gt;=5.6CI failing

Since Dec 22Pushed 6y ago1 watchersCompare

[ Source](https://github.com/rvtraveller/composerize-wordpress)[ Packagist](https://packagist.org/packages/rvtraveller/composerize-wordpress)[ RSS](/packages/rvtraveller-composerize-wordpress/feed)WikiDiscussions master Synced today

READMEChangelog (1)Dependencies (11)Versions (3)Used By (0)

Composerize WordPress
=====================

[](#composerize-wordpress)

*Composerize WordPress* is a Composer plugin that converts a non-Composer-managed WordPress application (e.g., one created via tarball) to a Composer-managed WordPress application. It is based on [Composerize Drupal](https://github.com/grasmash/composerize-drupal) by [Grasmash](https://github.com/grasmash/).

It is not for creating new WordPress applications.

Functionality
-------------

[](#functionality)

The `composerize-wordpress` command will perform the following operations:

- Remove all `composer.json` and `composer.lock` files, should they exist
- Generate a new `composer.json` in the `[composer-root]` directory based on [template.composer.json](template.composer.json).
    - Populate `require` with an entry for `pantheon-systems/wordpress-composer`
    - Populate `require` with an entry for each project in:
        - `[core-root]/wp-content/plugins`
        - `[core-root]/wp-content/themes`
- Create or modify `[composer-root]/.gitignore` with entries for Composer-managed contributed projects as [per best practices](https://getcomposer.org/doc/faqs/should-i-commit-the-dependencies-in-my-vendor-directory.md). You can modify `.gitignore` after composerization if you'd prefer not to follow this practice.
- Execute `composer update` to generate `composer.lock`, autoload files, and install all dependencies in the correct locations.

It will NOT add any contributed projects in `docroot/libraries` to `composer.json`. You must add those to your `composer.json` file manually. In addition to [packagist](https://packagist.org/) and Wpackagist.org packages, you may also use any package from [asset packagist](https://asset-packagist.org/), which makes NPM packages available to Composer.

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

[](#installation)

```
composer global require rvtraveller/composerize-wordpress

```

Usage:
------

[](#usage)

```
cd path/to/wordpress/project/repo
composer composerize-wordpress --composer-root=[repo-root] --core-root=[core-root]

```

The `[composer-root]` should be the root directory of your project, where `.git` is located.

The `[core-root]` should be the WordPress root, where `wp-load.php` is located.

Examples:

```
# WordPress is located in a `docroot` subdirectory.
composer composerize-wordpress --composer-root=. --core-root=./docroot

# WordPress is located in a `web` subdirectory.
composer composerize-wordpress --composer-root=. --core-root=./web

# WordPress is located in a `public_html` subdirectory (cPanel compatible).
composer composerize-wordpress --composer-root=. --core-root=./public_html

# WordPress is located in the repository root, not in a subdirectory.
composer composerize-wordpress --composer-root=. --core-root=.

```

Options
-------

[](#options)

- `--composer-root`: Specifies the root directory of your project where `composer.json` will be generated. This should be the root of your Git repository, where `.git` is located.
- `--core-root`: Specifies the WordPress root directory where `wp-load.php` is located.
- `--no-update`: Prevents `composer update` from being automatically run after `composer.json` is generated.
- `--no-gitignore`: Prevents modification of the root .gitignore file.
- `--exact-versions`: Will cause WordPress core and contributed projects (plugins, themes) to be be required with exact verions constraints in `composer.json`, rather than using the default caret operator. E.g., a `wordpress/core` would be required as `5.0` rather than `^5.0`. This prevents projects from being updated. It is not recommended as a long-term solution, but may help you convert to using Composer more easily by reducing the size of the change to your project.

###  Health Score

21

—

LowBetter than 19% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity43

Maturing project, gaining track record

 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

2330d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/75bac5a21073598dbd68f7f3b1f1e3ee609bc41d05b8c1bc2e6367a3cca54138?d=identicon)[rvtraveller](/maintainers/rvtraveller)

---

Top Contributors

[![rvtraveller](https://avatars.githubusercontent.com/u/1789427?v=4)](https://github.com/rvtraveller "rvtraveller (3 commits)")

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/rvtraveller-composerize-wordpress/health.svg)

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

###  Alternatives

[drush/drush

Drush is a command line shell and scripting interface for Drupal, a veritable Swiss Army knife designed to make life easier for those of us who spend some of our working hours hacking away at the command prompt.

2.4k57.4M679](/packages/drush-drush)[shopware/platform

The Shopware e-commerce core

3.3k1.5M3](/packages/shopware-platform)[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.4k5.6M648](/packages/sylius-sylius)[drupal/core

Drupal is an open source content management platform powering millions of websites and applications.

19462.3M1.3k](/packages/drupal-core)[humbug/box

Fast, zero config application bundler with PHARs.

1.3k801.5k68](/packages/humbug-box)[drupal/core-recommended

Locked core dependencies; require this project INSTEAD OF drupal/core.

6939.5M341](/packages/drupal-core-recommended)

PHPackages © 2026

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