Simple data migration for WordPress.
Create a migration file migrations/example.php
or the directory of your choice defined in MIGRATION_DIR
use Isotop\Migration\Migration;
class MyClassName extends Migration {
public function up() {
update_option( 'key', 'value' );
}
public function down() {
delete_option( 'key' );
}
}
Run the migration up:
wp migrate up
Run the migration down:
wp migrate down
Installing this package requires WP-CLI v1.1.0 or greater. Update to the latest stable release with wp cli update
.
Once you've done so, you can install this package with:
wp package install [email protected]:isotopsweden/wp-cli-migrate.git
MIT © Isotop