Drupal 版本升級

如何升級 Drupal 版本

  1. 備份下列原來的檔案以免升級不順利,可以還原:
  • Mysql資 料庫
  • 從主機下載 /sites 檔案 (因為新安裝的模組、資料、以設定的settings.php (database name, user, and password) ...本地電腦中沒有)之後,再備份。
  1. 將網站設定為維護模式。Configuration -> Maintenance mode
  2. 刪除主機中除了/sites 以外所有的檔案。
  3. 將新版本中/sites 刪除,上傳到主機中。
  4. 修改 /sites/default/settings.php 裡的 $update_free_access 的值為 TRUE
  5. 如果有修改 .htaccess 、robots.txt 或 /themes中的檔案,要修改新版本的檔案。
  6. 修改/sites/default/setting.php permission 為755
  7. 登入。https://yoursitename/user or https://yoursitename/xx/user  (xx is subfolder name)
  8. Run update.php by navigating to https://yoursitename/update.php  or https://yoursitename/xx/update.php
  9. Follow the process to update your Drupal instance
  10. Disable maintenance mode

Drupal 8 版本升級

  • 保留 modules, profiles, site, themes,其他全部刪除換新的版本。
  • 執行上述步驟5, 7, 9-11。