Giter VIP home page Giter VIP logo

wordpress-migration-for-cpi's Introduction

WordPress Migration for CPI

このシェルスクリプトはCPIサーバーで運用しているWordPressのデータベース、プラグイン、uploadsのデータをテスト環境やVCCWでの開発環境へ取り込むことができます。

前提条件

  • CPIの本番環境、テスト環境にwp-cliがインストールされていること
  • 開発環境はVCCWで構築されていること

準備

  1. wordpress-migration-for-cpi.sh のファイルをvccwの配下に設置する
  2. wordpress-migration-for-cpi.sh ファイルを開く
  3. 以下の情報を書き換える
################################
# Setting informaiton
################################
# ssh 
ssh_command_staging=""
ssh_command_prod=""

# url
local_url="http://local.test"
staging_url="https://test.smartrelease.jp"
production_url="https://your-domain"

# dir name and file name
wp_root="html"
wp_content_path="html/wp-content"
plugins_dir="plugins"
uploads_dir="uploads"
export_file_name="export.sql"

# ベーシック認証
user=""
password=""

ssh_command_staging, ssh_command_prod とは

~/.ssh/config に追加したhost名を記載してください。

使い方

sh wordpress-migration-for-cpi.sh {db or plugin or upload} {staging or local}

本番環境のデータベースをテスト環境へ反映する

sh wordpress-migration-for-cpi.sh db staging

本番環境のプラグインをテスト環境へ反映する

sh wordpress-migration-for-cpi.sh plugin staging

本番環境のuploadsディレクトリーをテスト環境へ反映する

sh wordpress-migration-for-cpi.sh uploads

テスト環境のデータベースを開発環境へ反映する

sh wordpress-migration-for-cpi.sh db local

テスト環境のプラグインを開発環境へ反映する

sh wordpress-migration-for-cpi.sh plugin local

wordpress-migration-for-cpi's People

Contributors

tkc49 avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.