WordPress 本地环境部署线上环境标准化流程(手动版)

WordPress 本地环境部署线上环境标准化流程(手动版)

目录

  1. Local Git Repository

  2. Rsync wp-content/upload

  3. Import Database

  4. 755 permission wp-content/upload


一. Git Local

  1. local repository

    1. git push

  2. remote server

    1. git fetch

    2. git merge

二. Rsync wp-content/upload file

rsync --ignore-existing -vzrh source target

-v : verbose
-r : copies data recursively (but don’t preserve timestamps and permission while transferring data
-a : archive mode, archive mode allows copying files recursively and it also preserves symbolic links, file permissions, user & group ownerships and timestamps
-z : compress file data
-h : human-readable, output numbers in a human-readable format

三. Import Database

  1. export local database

    • change URL

  2. remote import database

四. Remote Server Permission

  1. chmod -r 755 wp-content/uploads

资料引用

  1. Ignore existing files or update only newer files with rsync

  2. Rsync (Remote Sync): 10 Practical Examples of Rsync Command in Linux

标签: none

添加新评论