How to upgrade from Drupal 10 to Drupal 11
Sebelum mula – buat salinan sandaran skrip & pangkalan data.
Langkah 1
Pastikan persekitaran hosting anda menepati keperluan platform Drupal 11:
✅ Keperluan PHP:
PHP versi 8.3
✅ Keperluan Pangkalan Data:
MySQL: Memerlukan versi 8.0
MariaDB: Versi 10.6 atau lebih tinggi
✅ Pelayan Web (Web Server):
Apache: Versi 2.4.7 atau lebih tinggi
✅ Kebergantungan Utama (Key Dependencies):
Symfony 7
jQuery 4
PHPUnit 10
Composer 2.7.7
Langkah 2
Kemas kini kepada versi Drupal 10 terkini – sekurang-kurangnya Drupal 10.3.0 atau lebih baru.
Langkah 3
Semak modul yang sudah usang (deprecated) menggunakan modul Upgrade Status.
Langkah 4
Tambah akses tulis sementara pada fail dan direktori yang dilindungi:
bash
Copy
Edit
chmod 777 web/sites/default
chmod 666 web/sites/default/*settings.php
chmod 666 web/sites/default/*services.yml
Langkah 5
Laksanakan kemas kini teras Drupal 11:
bash
Copy
Edit
composer update drupal/core --with-all-dependencies
Langkah 6
Uji kemas kini kod secara simulasi terlebih dahulu:
bash
Copy
Edit
composer update --dry-run
Jika terdapat ralat, betulkan dahulu.
Jika semuanya baik, teruskan dengan kemas kini sebenar:
bash
Copy
Edit
composer update
Langkah 7 & 8
Pulihkan semula akses baca sahaja (read-only) kepada direktori sites/default:
bash
Copy
Edit
chmod 755 web/sites/default
chmod 644 web/sites/default/*settings.php
chmod 644 web/sites/default/*services.yml
client = ca-pub-2898279488603899
slot = 9058461004
format = auto