项目作者: isotopsweden

项目描述 :
Simple data migration for WordPress
高级语言: PHP
项目地址: git://github.com/isotopsweden/wp-cli-migrate.git
创建时间: 2018-02-14T09:56:07Z
项目社区:https://github.com/isotopsweden/wp-cli-migrate

开源协议:MIT License

下载


wp-cli-migrate

Simple data migration for WordPress.

Using

Create a migration file migrations/example.php or the directory of your choice defined in MIGRATION_DIR

  1. use Isotop\Migration\Migration;
  2. class MyClassName extends Migration {
  3. public function up() {
  4. update_option( 'key', 'value' );
  5. }
  6. public function down() {
  7. delete_option( 'key' );
  8. }
  9. }

Run the migration up:

  1. wp migrate up

Run the migration down:

  1. 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:

  1. wp package install git@github.com:isotopsweden/wp-cli-migrate.git

License

MIT © Isotop