isotopsweden / wp-cli-migrate
Simple data migration for WordPress
Installs: 1 692
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 2
Forks: 1
Open Issues: 0
Type:wp-cli-package
Requires (Dev)
- wp-cli/wp-cli: ^2.5.0
This package is auto-updated.
Last update: 2023-02-22 13:32:56 UTC
README
Simple data migration for WordPress.
Using
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
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 git@github.com:isotopsweden/wp-cli-migrate.git
License
MIT © Isotop