Chia Yi Lai

使用 Git 佈署 WordPress theme,不需再用 FTP 上傳了

痛點

每次要更新 WordPress theme 時,都要使用 FTP 上傳,相當麻煩。雖然之前也有使用一些工具,可以在編輯器點擊檔案就上傳,但還是很不方便。

使用 WP Pusher 解決痛點

WP Pusher 可以解決這個麻煩,而且幾分鐘就能設定完成,以下為設定步驟:

  1. 在官網下載 WP Push 外掛程式 zip 檔
  2. 到 WordPress 後台,安裝剛下載的外掛 zip 檔,安裝成功後,主選單會出現 WP Pusher 項目
  3. 登入 GitHub/Bitbucket/GitLab 就可取得 token,貼上並儲存
  4. install theme: 輸入 repository 相關資料即完成設定。
    (讓 repository name 和 theme name 一致,勾選 Push-to-Deploy and Link installed theme)
  5. 之後只要 push to repository,專案就能更新了
keyboard_arrow_up