Hướng dẫn cài đặt command line cho Drupal 9 - drupal list
6th Aug 2021Trên Linux
# Run this in your terminal to get the latest Console version: curl https://drupalconsole.com/installer -L -o drupal.phar # Or if you don't have curl: php -r "readfile('https://drupalconsole.com/installer');" > drupal.phar # Accessing from anywhere on your system: mv drupal.phar /usr/local/bin/drupal # Apply executable permissions on the downloaded file: chmod +x /usr/local/bin/drupal # Copy configuration files to user home directory. drupal init [--override] # Create a new Drupal project drupal site:new drupal8.dev 8.0.0 # Lists all available commands drupal list # Update to latest version. drupal self-update
Trên Window
# Run this in your terminal to get the latest Console version: curl https://drupalconsole.com/installer -L -o drupal.phar
Sau đó vào trong thư mục gốc của Drupal 9 chạy lệnh
composer require drupal/console:~1.0 --prefer-dist --optimize-autoloader
Hoặc
composer require drupal/console:~1.0 --with-all-dependencies
Thử test
php drupal.phar list
Hoặc
vendor/bin/drupal
Add new comment