承接 madebit/wordpress-data-migration 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

madebit/wordpress-data-migration

Composer 安装命令:

composer require madebit/wordpress-data-migration

包简介

README 文档

README

How to use

create a folder in your working directory for the migrations.

mkdir migrations

Create a file called CURRENT_VERSION in this folder and insert the current version number

touch migrations/CURRENT_VERSION
echo '0' > migrations/CURRENT_VERSION

Include the DataMigration into your project.

add_action('init', function () {
   new DataMigration(get_template_directory() . '/migrations/');
});

In the migrations folder, create a migration file. These files should be constructed with the version number and the classname. ${VERSION}-${ClassName}.php

touch migrations/1-DoThisAndThat.php

The file should look like this

<?php

namespace Madebit\WordpressDataMigration;

class DoThisAndThat extends \Madebit\WordpressDataMigration\AbstractMigration {

    public function up()
    {
      // migrate data when migrating up
    }

    public function down()
    {
      // migrate data when migrating down
    }
}
?>

To migrate, visit the Rest endpoint << YOUR INSTALL >>/wp-json/m8b/v1/migrate. To test or execute a specific version add the ?version=<INT> parameter.

统计信息

  • 总下载量: 16
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: Unknown
  • 更新时间: 2021-01-18

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固