Score:0

DrupalKernel' not found after server migration

in flag

i am try to migrate a drupal site to a new server (from cPanel to Plesk).

  1. I copyied the files from old server and pasted on new server
  2. Export database via phpmyadmin and import on new database on new server, again via phpmyadmin.
  3. Edit settings.php (on /httpdocs/sites/default/settings.php) with new credentials for database connection on new server.

and i have the error:

Warning: include(/var/www/vhosts/domain.gr/httpdocs/vendor/composer/../../public_html/core/lib/Drupal/Core/DrupalKernel.php): failed to open stream: No such file or directory in /var/www/vhosts/domain.gr/httpdocs/vendor/composer/ClassLoader.php on line 478

Warning: include(/var/www/vhosts/domain.gr/httpdocs/vendor/composer/../../public_html/core/lib/Drupal/Core/DrupalKernel.php): failed to open stream: No such file or directory in /var/www/vhosts/domain.gr/httpdocs/vendor/composer/ClassLoader.php on line 478

Warning: include(): Failed opening '/var/www/vhosts/domain.gr/httpdocs/vendor/composer/../../public_html/core/lib/Drupal/Core/DrupalKernel.php' for inclusion (include_path='/var/www/vhosts/domain.gr/httpdocs/vendor/pear/archive_tar:/var/www/vhosts/domain.gr/httpdocs/vendor/pear/console_getopt:/var/www/vhosts/domain.gr/httpdocs/vendor/pear/pear-core-minimal/src:/var/www/vhosts/domain.gr/httpdocs/vendor/pear/pear_exception:.:/opt/plesk/php/7.2/share/pear') in /var/www/vhosts/domain.gr/httpdocs/vendor/composer/ClassLoader.php on line 478

Fatal error: Uncaught Error: Class 'Drupal\Core\DrupalKernel' not found in /var/www/vhosts/domain.gr/httpdocs/index.php:16 Stack trace: #0 {main} thrown in /var/www/vhosts/domain.gr/httpdocs/index.php on line 16 (Line:16 in index.php : $kernel = new DrupalKernel('prod', $autoloader);)

The two server are running on same php version 7.2 with nginx. Composer is allready installer on plesk v2.2.6

I tried to apply this solutions: PHP Fatal error: Class 'Drupal\Core\DrupalKernel' not found

and others similar solutions, by updating composer (by running composer install, composer update) , with no reasults.

I have root access only in new server (we are the web-hosters) and we shouldered the site migration.

Did i miss something? Any help, will be nice.

cn flag
Try `composer dump-autoload`. If that fails, restart PHP-FPM
Hector Solutions avatar
in flag
Yes and thnx for your reply, but, i will run this command via SSH, in which directory i will run this command? on hosting packet root or on server root?
Hector Solutions avatar
in flag
on Server root and host packate root same reasults:# composer dump-autoload /usr/bin/env: php: No such file or directory
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.