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)2413.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 today

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 66% of packages

Maintenance19

Infrequent updates — may be unmaintained

Popularity31

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

4478d 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

[illuminate/console

The Illuminate Console package.

13046.0M6.5k](/packages/illuminate-console)[styleci/cli

The CLI tool for StyleCI

71470.5k9](/packages/styleci-cli)[winbox/args

Windows command-line formatter

20720.9k21](/packages/winbox-args)[tomatophp/filament-artisan

Simple but yet powerful library for running some artisan commands for FilamentPHP

3275.4k1](/packages/tomatophp-filament-artisan)[thettler/laravel-console-toolkit

This Package provides some usefully console features like the attribute syntax for arguments and options, validation, auto ask and casting.

324.1k](/packages/thettler-laravel-console-toolkit)

PHPackages © 2026

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