Ubuntu 管理心得

搜尋此網誌

2023年11月13日 星期一

Upgrade drupal 10 from 9

  1. Copy drupal database to drupal10_from_9
  2. Copy ~/public_html/drupal to ~/public_html/drupal10_from_9 
  3. Edit web/sites/default/settings.php. Change database from drupal to drupal10_from_9
  4. In phpmyadmin, set drupal10_from_9 database privileges to user drupaladmin
  5. Browse http://localhost/~chiao/drupal10_from_9/web, go to: 管理 -> 擴展 
    1. 安裝:
    2. 解除安裝:
          CKEditor (Deprecated)
          Add HW Exam
          Add My Exams Forms     
          Amazing forms     
          Appraisal Edit Forms     
          Appraisal Export Forms     
          Appraisal List Forms     
          Engineering Graphics     
          Engineering Graphics YouTube    
          FAHP Expert Data Creation Forms     
          FAHP Hierarchy Creation Forms     
          FAHP Online forms     
          FAHP Show Membership Forms     
          FAHP Synthesis Computation Form
      (for drupaladm)PCM Consistency Check Forms   
          Grade Query forms     
          Hello World     
          Industrial English     
          List HW Exam     
          Science Technology English     
          Teacher Appraisal Forms
  6. cf: https://www.drupal.org/docs/upgrading-drupal/upgrading-from-drupal-8-or-later/how-to-upgrade-from-drupal-9-to-drupal-10
    chmod 777 web/sites/default
    sudo chmod 666 web/sites/default/*settings.php
    chmod 666 web/sites/default/*services.yml
    composer require 'drupal/core-recommended:^10' 'drupal/core-composer-scaffold:^10' 'drupal/core-project-message:^10' --no-update
    composer require 'drupal/core-dev:^10' --dev --no-update
    composer update
  7. set $settings['update_free_access']= TRUE  in settings.php
  8. visiting httsp://localhost/~chiao/drupal10_from9/web/update.php
    Some modules need to be upgraded, e.g. color. Click color will open the color module project, then copy the composer line to install it inside ~/public_html/drupal0_from_9/web
    1. If there are messages like below:
      Status Details
      發現錯誤
      Removed core modules
      You must add the following contributed modules and reload this page.

          Color
          Quick Edit
          RDF

      These modules are installed on your site but are no longer provided by Core.
      For more information read the documentation on deprecated modules.
      Removed core themes
      You must add the following contributed themes and reload this page.

          Seven
          Bartik
    2. cd ~/public_html/drupal10_from_9, then
      composer require 'drupal/color:^1.0'
      composer require 'drupal/quickedit:^1.0'
      composer require 'drupal/rdf:^2.1'
      composer require 'drupal/seven:^1.0'
      composer require 'drupal/bartik:^1.0'
    3. Go to and make sure update.php page not complain anymore. (IMPORTANT!),
      If shows "Drupal 資料庫更新", then click 繼續 and Apply pending updates Until the page shows "Drupal 資料庫更新".
    4. set back $settings['update_free_access'] = FALSE  in settings.php. 
    5. chmod 755 web/sites/default
    6. sudo chmod 600 web/sites/default/*settings.php
    7. chmod 644 web/sites/default/*services.yml
    8. Go to  http://localhost/~chiao/drupal10_from_9/web/admin/reports/updates It should be

      Drupal 核心

      最新的 確定
    9. Go to http://localhost/~chiao/drupal10_from_9/web/admin/config/development/performance Click "清除所有快取"
    10. Add my own modules, e.g. Grade Query:
      cd  ~/public_html/drupal10_from_9/web/modules/custom/grade_query
      Edit  grade_query.info.yml: core_version_requirement: ^8 || ^9 || ^10
      Go to http://localhost/~chiao/drupal10_from_9/web/admin/modules
      Click: Grade Query forms 查詢成績

      安裝
       
       
       
    Done!

沒有留言:

張貼留言

網誌存檔