PHPackages                             foogile/wp-cli-mig - 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. [CLI &amp; Console](/categories/cli)
4. /
5. foogile/wp-cli-mig

ActiveWp-cli-package[CLI &amp; Console](/categories/cli)

foogile/wp-cli-mig
==================

General migration command for WP-CLI

v0.0.2(12y ago)2313.4k1[1 issues](https://github.com/stianlik/wp-cli-mig/issues)WTFPLPHPPHP &gt;=5.3.0

Since Feb 17Pushed 9y ago3 watchersCompare

[ Source](https://github.com/stianlik/wp-cli-mig)[ Packagist](https://packagist.org/packages/foogile/wp-cli-mig)[ RSS](/packages/foogile-wp-cli-mig/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (3)DependenciesVersions (4)Used By (0)

wp-cli-mig
==========

[](#wp-cli-mig)

General migration command for WP-CLI

Example migration
-----------------

[](#example-migration)

1. Create migration script

    ```
    // filename: migrations/1_FirstMigration.php
    namespace WpCliMigrate;

    use Foogile\WpCli\Migrate\MigrationInterface;

    class FirstMigration implements MigrationInterface
    {

        public function up()
        {
            // Do some work using WordPress API
        }

        public function down()
        {
            // Undo some work using WordPress API
        }

    }
    ```
2. Move into folder migrations and execute migrations using WP-CLI

    ```
        # Migrate to version 1
        wp --require=/path/to/command.php mig to 1

        # Migrate to version 2
        wp --require=/path/to/command.php mig to 2

        # Revert all migrations
        wp --require=/path/to/command.php mig to 0

        # Status
        wp --require=/path/to/command.php mig status
    ```

For migrations that should stop execution, throw exceptions from up/down-methods. I.e. a non-reversable migration will typically refuse a `down()`-operation: `throw new \Exception("Cannot rollback migration")`.

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance19

Infrequent updates — may be unmaintained

Popularity32

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

 Bus Factor1

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

###  Release Activity

Cadence

Every ~21 days

Total

3

Last Release

4432d ago

### Community

Maintainers

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

---

Top Contributors

[![stianlik](https://avatars.githubusercontent.com/u/410251?v=4)](https://github.com/stianlik "stianlik (11 commits)")[![danielbachhuber](https://avatars.githubusercontent.com/u/36432?v=4)](https://github.com/danielbachhuber "danielbachhuber (2 commits)")

### Embed Badge

![Health badge](/badges/foogile-wp-cli-mig/health.svg)

```
[![Health](https://phpackages.com/badges/foogile-wp-cli-mig/health.svg)](https://phpackages.com/packages/foogile-wp-cli-mig)
```

###  Alternatives

[wp-cli/wp-cli

WP-CLI framework

5.1k17.2M320](/packages/wp-cli-wp-cli)[consolidation/annotated-command

Initialize Symfony Console commands from annotated command class methods.

22569.8M19](/packages/consolidation-annotated-command)[seld/cli-prompt

Allows you to prompt for user input on the command line, and optionally hide the characters they type

24725.8M17](/packages/seld-cli-prompt)[illuminate/console

The Illuminate Console package.

12944.1M5.1k](/packages/illuminate-console)[php-tui/php-tui

Comprehensive TUI library heavily influenced by Ratatui

589747.0k6](/packages/php-tui-php-tui)[codedungeon/php-cli-colors

Liven up you PHP Console Apps with standard colors

10210.1M26](/packages/codedungeon-php-cli-colors)

PHPackages © 2026

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