Drupal 9 and lightning
If you want to try building a website using Drupal the best way to go about it is to use the lightning profile. The Lightning profile is a set of modules that make Drupal easier to use. You can find out more at http://lightning.acquia.com. It's built by the same people that are the main backers of the Drupal project. So you'll be in good hands.
Drupal 9 just came out and you can install it using lightning, with a few extra steps. First follow the steps to make your machine PHP compatible. I own a Mac so I followed the steps on https://getgrav.org/blog/macos-catalina-apache-multiple-php-versions with PHP 7.4 enabled. With PHP installed we need the Composer Dependency Manager to install drupal which you can get from https://getcomposer.org/doc/00-intro.md. Once you've installed composer you can use it to create your Drupal project with the following instruction in a terminal:
$ composer create-project acquia/lightning-project todo
$ cd todo
$ composer install -vvv
Where todo is the name of the project. The problem as of today in the middle of June 2020 is that the current version of lightning (4.1.4) is still using Drupal 8. Which is not bad, but if you want to start a website, you'd like to start with the latest which at the moment is Drupal 9. Fortunately Acquia has been working on the Lightning profile for Drupal 9 on its version 5 which is currently in the beta stage. Let's upgrade our project to use it. But first we would need to update Drush. This dependency is currently at 9.7.2, but we need it to be above 10 to work with Drupal 9, so we'll use the latest as of today.
$ composer require drush/drush:^10.2.2
When this process finishes we should be able to upgrade Lightning with:
$ composer require --no-update acquia/lightning:~5.0.0-beta2
$ composer update -vvv
Your project is ready to be configured but to do that we would need Apache and a database configured. The supported databases can be found at https://www.drupal.org/docs/system-requirements/database-server. Since I'm using a Mac I use brew to install it. If you're using MySQL note that the latest version (8) is not fully supported yet, so you'll need to install version 5. In my case I used:
$ brew install mysql@5.7
$ mysqladmin -uroot create todo
With these 2 instructions I've installed mysql and created the todo database with user root which by default has no password in my installation. Now all you need to do is to set the docroot folder in Apache. You can do this by making it the default docroot or a virtual host's docroot. If you configured the default and your Apache instance is running on port 80 then just go to http://localhost. If it's running on 8080 then you would go to http://localhost:8080 (you get the idea).
Follow the simple configuration instructions, there's one screen in which it asks what do you want to install, just bare drupal, the preconfigured website or the lightning profile. Choose the lightning profile.
Once that finishes configuring it should show you Drupal 9's homepage.
Comments
Post a Comment