While setting up a new Drupal 10 site with composer, installing the first module using composer causes a 500 (internal server error) for all pages. This is my first time installing any version of Drupal through composer or installing modules through composer. I've previously installed other Drupal versions (6, 7, and 8) and modules without issue, but without using composer.

Drupal 10.2.3 was installed with

/usr/bin/php8.2-cli ../composer.phar create-project drupal/recommended-project sitename

The installation with composer proceeded normally (no errors). The subsequent Drupal install was normal. I was able to log into the new site and perform some minimal configuration through the Drupal admin ui.

My next step was to install the PathAuto module with

/usr/bin/php8.2-cli ../composer.phar require 'drupal/pathauto:^1.12'

Composer reported PathAuto as installed. Indeed, checking the file system showed that PathAuto was installed in ../web/modules/contrib/pathauto along with the dependencies of CTools and Token.

Refreshing any page in the browser immediately displays the 500 error.

In some cases, the 500 error is related to needing to uncomment RewriteBase / in .htaccess, which I've done.

I tried removing PathAuto with

/usr/bin/php8.2-cli ../composer.phar remove 'drupal/pathauto:^1.12'

Composer reported "... has not been removed."

I don't have access to the server's logs; it's a shared hosting provider.

Very few of the articles I've read and questions posted here deal with composer and Drupal 10. Of those that do, most seem to be concerned with issues related to upgrades.

Clearly, I've missed something.

What have I missed? What additional information would help troubleshoot?

I don't have a lot of time invested in setting up this site as of now, so if the answer is "start over", that's okay.

  • Welcome to Drupal answers! We are going to need a little more information in order to form the answer to your question, starting with the precise nature of the 500 error. Absent that this question will be closed.
    – cilefen
    Feb 12 at 1:01
  • 1
    Are there any hosting providers out there not providing error logs? At least they should let you display PHP errors on the screen and Drupal can be configured in settings.php $config['system.logging']['error_level'] = 'verbose';
    – 4uk4
    Feb 12 at 7:45


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.