I've been managing a few Drupal sites from the UI backend for several years, and I want to update my skills by extending my Drupal installations through Composer, as I see it’s the preferred method for installing modules.
My hosting provider uses Installatron, which automatically installs Drupal and creates the database for me, which is very convenient. However, when I install a module (e.g., Webforms) via Composer, I immediately lose access to my admin pages. The main page of the site remains functional, but I get an error when trying to access the backend: 'The website encountered an unexpected error. Please try again later.'
I’ve read that managing modules through Composer means I shouldn’t install them manually via the UI, but I’m wondering if this rule applies on a fresh installation as well. I also noticed that Installatron seems to use Composer since I see a composer.json file in the site’s directory.
Am I on the right track with using Composer for module management? Or is there a different approach I should follow?
Any guidance or suggestions would be greatly appreciated!
Comments
SPAM
This is essentially a rewrite of an old post from 21 dec 2023:
From https://www.drupal.org/forum/support/installing-drupal/2023-12-21/how-to...
This post: