I want to deploy a Drupal 8 site from localhost (Windows OS) to a live domain (Linux). How can I do this?

I tried copying over the files, updating settings.php with the new database connection, and editing .htaccess to include the RewriteBase.

But I am running into an issue where it either gives me a 500 error or rewrites requests to the parent directory (which also has Drupal installed). I don't have these problems if I do a fresh Drupal install in the sub directory.

closed as too broad by kiamlaluno Jul 26 '18 at 9:22

Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • The problem appears to come from the migration. If I do a fresh install of drupal in a sub-directory there is no problem. This is driving me crazy. – Aaron Kreider Jul 20 '18 at 1:37
  • 2
    This is impossible to solve from afar as it can be pretty much everything. Wrong file ownership, wrong database permission, misconfigured Apache, some absolute paths to your local Drupal that are now wrong etc. – leymannx Jul 20 '18 at 6:24
  • It isn't an issue with the database permissions or misconfigured Apache (unless you are talking about the .htaccess file which could be an issue). File ownership is slightly more generous and probably fine (default of 664 instead of a normal 644). – Aaron Kreider Jul 20 '18 at 20:57
  • 1
    I forgot about the Apache error log! Oops. Having things be group writeable is causing a SoftException. So it is the file ownership! [Fri Jul 20 21:12:31.786520 2018] [:error] [pid 12258] [client] SoftException in Application.cpp:657: Directory "/home/energy/public_html/justice/drupal-8.5.5" is writeable by group – Aaron Kreider Jul 20 '18 at 21:14
  • 1
    This question is really broad and also I don't think the use of migrate in this context is correct. I think the terminology you were looking for is "deploy". – Christia Jul 20 '18 at 23:53

The problem was the file permissions. When the files and directories were uploaded they were given group writeable permission. This caused a SoftException in Apache which appeared in the Apache error log.

Removing group writeable permissions for all the files and directories solved the problem.

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