PHPackages                             alleyinteractive/wp-to-psr-4 - 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. [PSR &amp; Standards](/categories/psr-standards)
4. /
5. alleyinteractive/wp-to-psr-4

ActiveProject[PSR &amp; Standards](/categories/psr-standards)

alleyinteractive/wp-to-psr-4
============================

Migrate a WordPress-style code base to PSR-4 file structure.

v1.0.4(1y ago)481[1 issues](https://github.com/alleyinteractive/wp-to-psr-4/issues)GPL-2.0-or-laterPHPPHP ^8.2|^8.3

Since Jun 11Pushed 7mo ago19 watchersCompare

[ Source](https://github.com/alleyinteractive/wp-to-psr-4)[ Packagist](https://packagist.org/packages/alleyinteractive/wp-to-psr-4)[ RSS](/packages/alleyinteractive-wp-to-psr-4/feed)WikiDiscussions develop Synced 1mo ago

READMEChangelog (5)Dependencies (7)Versions (7)Used By (0)

wp-to-psr-4
===========

[](#wp-to-psr-4)

Migrate a WordPress-style code base to PSR-4 file structure. For example:

```
src/example/path/to/class-file.php -> src/Example/Path/To/ClassFile.php
src/example/trait-ReusableTrait.php -> src/Example/ReusableTrait.php
src/example/interface-ReusableInterface.php -> src/Example/ReusableInterface.php

```

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

[](#installation)

You can download the latest `wp-to-psr4.phar` phar from the [releases page](https://github.com/alleyinteractive/wp-to-psr-4/releases) using the following example:

```
wget $(curl -s https://api.github.com/repos/alleyinteractive/wp-to-psr-4/releases/latest | grep "browser_download_url" | grep "wp-to-psr4.phar" | cut -d '"' -f 4)
chmod +x wp-to-psr4.phar
mv wp-to-psr4.phar /usr/local/bin/wp-to-psr4
```

Or you can install it globally using Composer:

```
composer global require alleyinteractive/wp-to-psr-4
```

Usage
-----

[](#usage)

```
wp-to-psr4 path/to/convert

```

### Options

[](#options)

```
--dry-run

```

Prints the changes that would be made without actually making them.

```
--exclude

```

Exclude a directory/file from being converted. This option can be used multiple times and accepts glob patterns.

```
--no-git

```

Do not run `git mv` on the files. Will only make changes to the file system.

Credits
-------

[](#credits)

This project is actively maintained by [Alley Interactive](https://github.com/alleyinteractive). Like what you see? [Come work with us](https://alley.com/careers/).

- [Sean Fisher](https://github.com/srtfisher)
- [All Contributors](../../contributors)

License
-------

[](#license)

The GNU General Public License (GPL) license. Please see [License File](LICENSE) for more information.

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance46

Moderate activity, may be stable

Popularity10

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor1

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

Every ~21 days

Total

5

Last Release

616d ago

PHP version history (2 changes)v1.0.0PHP ^8.2

v1.0.1PHP ^8.2|^8.3

### Community

Maintainers

![](https://www.gravatar.com/avatar/338d27065b1074f2d66d049d742f22996dd137eef6f91bc8f75350ceee1e8ef2?d=identicon)[srtfisher](/maintainers/srtfisher)

---

Top Contributors

[![srtfisher](https://avatars.githubusercontent.com/u/346399?v=4)](https://github.com/srtfisher "srtfisher (32 commits)")[![renatonascalves](https://avatars.githubusercontent.com/u/19148962?v=4)](https://github.com/renatonascalves "renatonascalves (2 commits)")[![szepeviktor](https://avatars.githubusercontent.com/u/952007?v=4)](https://github.com/szepeviktor "szepeviktor (1 commits)")

---

Tags

coding-standardspsr-4wordpress

###  Code Quality

TestsPHPUnit

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/alleyinteractive-wp-to-psr-4/health.svg)

```
[![Health](https://phpackages.com/badges/alleyinteractive-wp-to-psr-4/health.svg)](https://phpackages.com/packages/alleyinteractive-wp-to-psr-4)
```

###  Alternatives

[laravel/dusk

Laravel Dusk provides simple end-to-end testing and browser automation.

1.9k36.7M259](/packages/laravel-dusk)[laravel/horizon

Dashboard and code-driven configuration for Laravel queues.

4.2k84.2M225](/packages/laravel-horizon)[tightenco/jigsaw

Simple static sites with Laravel's Blade.

2.2k438.5k29](/packages/tightenco-jigsaw)[laravel-zero/framework

The Laravel Zero Framework.

3371.4M369](/packages/laravel-zero-framework)[wnx/laravel-stats

Get insights about your Laravel Project

1.8k1.8M7](/packages/wnx-laravel-stats)[drupal/core

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

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

PHPackages © 2026

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