2

I have updated my core to 8.9.0, all modules are Drupal 9 compatible and now I want to upgrade to Drupal 9.0.0. I always did my updates completely manually via FTP/web (swap core/vendor/root files, no SSH/drush/composer).

But for 8 to 9 drupal.org has only instructions using drush or composer, unlike the update instructions for Drupal 8 which had an instruction for how to do it manually.

Upgrading from Drupal 8 to Drupal 9 (or higher) https://www.drupal.org/docs/upgrading-drupal/upgrading-from-drupal-8-to-drupal-9-or-higher

Is there no way to upgrade manually, without SSH/Drush/Composer?

  • 1
    Does this answer your question? Drush on production server without Composer – leymannx Jun 8 at 22:49
  • 1
    Similar to the answers to the Drush question you can run the Composer commands locally and then upload the vendor directory and all other updated directories (core/, modules/contrib/ etc.) and scaffold files (development.services.yml, .htaccess, robots.txt etc.) to your server. Then ssh into your server's project directory and directly call vendor/drush/drush/drush -y updb to perform database updates or vendor/drush/drush/drush cr to flush caches. Git tracking your whole project by removing all .gitignore files will help you to identify any updated file. – leymannx Jun 8 at 22:56
  • Thanks for the hints, I will look into the composer commands. Any chance to do this without SSH/drush? Just FTP and browser? I edited question to make this more clear. – c1u31355 Jun 9 at 0:00
  • Sure you can also apply database updates by visiting /update.php and then you can also flush the cache from the backend again. – leymannx Jun 9 at 6:13
2

Yes you can. But it needs a little bit of effort beforehand.

You need to have a composerized and version tracked local copy of your site on your computer. All the updating with Composer will happen there then. Look around a bit for Drupal+composerize, there are a few options out already to composerize your site.

From now on, after upgrading/updating your local site with Composer you upload the updated dependencies (the vendor/ directory, the core/ directory, all contrib directories, all libraries directories etc. but also updated scaffolding files like the robots.txt file, the development.services file etc.) to your host via (S)FTP for example and then access your live site's /update.php URL to trigger pending database updates.

As your local site should be version tracked now via Git for example you'll always see which files exactly got updated. For that you may need to adjust the default .gitignore files a bit to only ignore files with sensitive information like the settings.php file. But everything else (the vendor/ directory, the core/ directory, the contrib directories etc.) should better be version tracked to identify changes more easily. When you are done git add . everything and git commit -m "Update project." and git push to some private repo somewhere before you update your project the next time.


Ah look, there's still one alternative. Although what's been described above should be the recommended way you can follow the guide on Update core manually which tells you that you could Download Drupal zip and then upload certain contents of it to your host replacing the vendor/ and the core/ directory and some scaffolding files. This guide applies for Drupal 9 as well.

| improve this answer | |
  • 1
    So before asking the question, I already tried the "swap-folders" method, which is described to update (not to upgrade) drupal core. It gave me a load of errors on entering update.php, so I thought we can't use this method to upgrade. Now that @leymannx gave me the hint again, I tried the following: download clean 8.9.0, install minimal, add random module for testing purposes, then try upgrading to drupal 9 by just swapping the folders and the root files and running update.php. What can I say: it works. Have to check why my installations fail to upgrade. But absolutely thank u for help!! – c1u31355 Jun 9 at 16:19
  • 1
    @c1u31355 – Oh yeah, it's probably the best debugging tipp for nearly every issue: Trying to reproduce it with a fresh installation. This gives a lot of confidence to tackle the issue down. 👍 – leymannx Jun 9 at 17:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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