I am trying to move CiviCRM and Drupal to a new server. Everything looks to me like it should be right. I know that Drupal can connect to its database and is able to run simple drush commands. However if I try and run cv sql or cv flush I get a fatal error.

Class "ComposerAutoloaderInitDrupal8" not found

The error points to the file Drupal8.php line 414.

I am using the command line because I have multiple problems with the setup that are not allowing Apache to load the page and I am trying troubleshoot. Of course this is probably part of the problem.

I have the following:

PHP: 8.0.30 Drupal: 9.5.11 CiviCRM: 5.64.3 CIVICRM_ROOT_PATH: /var/aap/current/vendor

I am not sure what other relevant information I can provide.


  • 1
    Okay, I found the issue. I thought the path needed to be /vendor rather than my document root.
    – Josh
    Oct 21, 2023 at 20:37

1 Answer 1


I'd started from cleaning up "vendors" and running "composer update". If not work, re-install CiviCRM would.

  • thank you for the idea. I have ran a composer update and it has not made a change. I am not sure what you mean by re-install CiviCRM. I cannot lose my database. Thanks!
    – Josh
    Oct 21, 2023 at 6:23
  • @Josh you won't be losing the database on re-install: just make a backup, install a fresh civcrm using another , empty database, then plug in your current db from the backup.
    – yurg
    Oct 21, 2023 at 16:59

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.