How do I move a site to a new server?

I have a backup file for the database content and all the files. I uploaded it using cPanel to the new server, imported the database, and updated the username and password as well.

For some reason, the website is just showing this message.

The website encountered an unexpected error. Please try again later.

The content of the error log provided by my hosting provider is the following.

enter image description here

How can I fix this?

  • This too broad a question to answer here succinctly for any D8 site. You'll need to consult your PHP/web server logs to understand why the above error happened.
    – Shawn Conn
    Jul 4, 2018 at 20:28
  • Hi @ShawnConn I have updated my question with the error log provided by my host provider. Thanks Jul 4, 2018 at 20:31

1 Answer 1


It seems that you may forgot to move the vendor directory to the new location. Also you may need to run composer dump-autoload to update the autoloader with your new vendor's path. Though may be obvious to many, you need to clear the Drupal cache, in this case I prefer do a truncate over the cache bins (assuming you're using the default cache backend).


Also worth checking the autoload.php file in your Drupal root, this file includes the actual autoloader generated by Composer.

  • Thank you for your reply. Could you please help with any tutorial/article which could help me to do this? I am a newbie in Drupal. Jul 5, 2018 at 9:16
  • I could improve my answer with some basic or common examples
    – d70rr3s
    Jul 5, 2018 at 9:33

Your Answer

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

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