r/drupal • • 20d ago

Migrating a website

Hey friends,

I inherited my predecessors drupal 8 website. I’ve found it to be difficult to debug and follow the structure that has been set up. Ultimately, I want to update the websites appearance and versioning to make it more modern. Would it be possible for me to create a fresh installation of drupal 11 and then import/migrate the old site’s database? Or should I try to upgrade the old site?

I have never used drupal before, so I’m thinking that going through a fresh installation will build familiarity and make the site easier for me to maintain. I would appreciate any advice or insights! Thank you!

6 Upvotes

15 comments sorted by

3

u/dane_websites 19d ago

If you're really good with Composer, or you're happy to learn it and get really good at it, I'd recommend upgrading the D8 site through all the newer versions. But if not (and I get it; dependency management can be painful), then rebuilding it in D11 and migrating it is fine.

If you do the second option, when it comes time to migrate all the content, you have a few options. If the content is simple (not too many content types, not too many fields), it might be easiest to export all content to spreadsheets, them import them in the new site using Feeds. But if it's fairly complex, you'll probably want to use Drupal's migrate modules... but they require a lot of learning if you've never used them before, so given that you're new to Drupal, that will probably be a nightmare unless you're an incredibly fast learner.

1

u/Old-Season-6791 18d ago

Im trying to upgrade from 8.8.3 to 9 and eventually to 11. A couple of the modules want composer 1 in order to update, but its deprecated and I can’t downgrade from composer 2. I feel dumb because I can’t figure out how to update my packages given this issue.

2

u/dane_websites 17d ago

Whoa, I haven't used composer 1 in years. I didn't even know packages could require it 🫤

Here's an idea: export the database (just in case), and write down all the Composer packages the site currently uses. Then delete the package.lock file, and in the packages.json file, make sure no packages are locked to a specific version (i.e. the should still be like drupal/module:^ 3, not drupal/module:3.1.1), including drupal core (the 3-4 dependencies starting with drupal/drupal). Then run composer install. It should then install the latest version of each within that major version, while making sure it's compatible with your current version of drupal 8.

Then run drush updb or /update.php - both of which allow drupal to update the database according to the newly installed versions of the modules.

I think that should all work using composer 2.

4

u/kerasai 20d ago

Either approach is probably feasible, it's mostly a decision of which is the quickest/easiest as well as what is most sustainable going forward.

If you do the upgrade/update approach, you'll need to go 8 -> 9, 9 -> 10, and 10 -> 11. It will be a fair amount of work to find acceptable versions for all of the contrib modules, etc. for each upgrade. It's also possible that you'll find that you're using a module that doesn't have Drupal 10 or 11 releases.

I would lean towards the rebuilt and migrate approach. It's a "fresh start" opportunity to drop some tech debt and start with a clean system. The drawback here is that you'll need to have a good understanding of the existing site's functionality, data models, etc.

1

u/Wishitweretru 20d ago

8.2 versus 8.7 are pretty different. By the time you get to the high 8s the upgrades get pretty easy. Really you are up against PHP changes after 8.7 (or so), and you usually just run into a few recurrent issues.

In general, I would upgrade everything, if the theme gives you too much trouble just turn it off, and start on your custom theme.

1

u/Old-Season-6791 19d ago

It’s 8.7 but I’m not sure how many of the modules will upgrade with drupal

1

u/Wishitweretru 18d ago

There are dome tools for that questions:  https://www.drupal.org/project/upgrade_status

6

u/Fun_Constant_5223 19d ago

Setup a new D11 and ask Claude Code to port the old DB and features for you. Otherwise you have to painfully upgrade D8->D9->D10->D11 and debug for weeks.

2

u/geekwizard77 19d ago

I did this recently, created a new site with the theme I preferred and then used Claude to transfer the data from the old site to the new site. I had about 3,000 articles, etc., to transfer, and it went quite smoothly.

5

u/[deleted] 19d ago

[removed] — view removed comment

1

u/Fun_Constant_5223 18d ago

Letting somebody who has little experience in doing that specific migration doing it sounds riskier than using an AI that can handle that stack quite good. Doesn't mean you don't have to test the results, but you can skip tests in between migrating the Drupal versions from 8 up to 11.

3

u/Glad_Professor9518 20d ago

What version of Drupal is the old site on? You can visit
Reports > Status Report
to find out if you aren’t sure.

Sometimes it can make sense to re-create the code base (at the same version of Drupal, including all of the enabled modules & themes at their same versions or greater) to clean up a poorly assembled codebase. But that is not usually effective at improving the site’s debug-ability.

Whether a rebuild makes sense depends on how complex the site is and what version of Drupal the existing site is running on.

Does it have custom modules?

2

u/JavierEchave12 16d ago

You can’t import the old database straight into a fresh Drupal 11 install. Drupal.org’s upgrade docs say you can’t skip a major version, so an in-place upgrade means going 8, then 9, then 10, then 11.

For someone new to Drupal I’d compare two routes. First, install Upgrade Status on the old site and see how much custom code and how many outdated modules you have. If that report is long, the staged upgrade gets painful. Second, build a clean Drupal 11 site with Composer, recreate the content types and views you actually use, and move the content across with the Migrate API (Migrate Plus and Migrate Tools help there).

Since you find the current structure hard to follow, I’d lean towards the rebuild unless the site is huge. It’s also a good way to learn Drupal. Either way, take a full backup first and work on a copy, not the live site.

1

u/tekNorah 17d ago

I found a Reddit discussion about moving from Drupal 8 to Drupal 11, and its advice sounds like a more practical path here: upgrade the existing site through each major version, keeping the database with it.

Before choosing the upgrade steps, I’d check how the current codebase is managed. Having Composer installed, or a composer.json file from the original download, doesn’t necessarily mean the site’s core and modules have been maintained as a Composer-managed project. Drupal has a guide for adding Composer to an existing site.

If it is Composer-managed, I’d work on a copy and upgrade through Drupal 8, 9, 10, and 11. First bring 8.8.3 to the final Drupal 8 release. Check module and custom-code compatibility before each step. Upgrade Status and Drupal Rector can help identify compatibility issues and update custom code.

I wouldn’t downgrade to Composer 1. Drupal 11 requires Composer 2.7 or later. The exact Composer error and package names should show what’s blocking the update and whether a dependency needs to be updated, replaced, patched, or removed.

Since you’re new to Drupal, you could also join the Drupal Slack and ask in #support. Include the Drupal and Composer versions and the exact Composer error, with any credentials or private details removed.

Do the work on a local or staging copy, take a full backup, and test the site after each upgrade. Once it’s on Drupal 11, you can review the inherited configuration and modules, then update the theme and page structure. The upgrade itself won’t clean up the site’s existing organization.

1

u/Chris_Lojniewski 13d ago

Both work, but they're very different amounts of work

Upgrading in place is the official path from 8. you go step by step: latest 8.9, then 9, then 10, then 11, with composer, and the upgrade status module tells you at each step which modules and custom code use deprecated stuff. if the site is mostly core and well-maintained contrib modules, this is usually less work than it sounds

Fresh 11 + migrate sounds cleaner but the core migrate UI is built for drupal 6/7 sources. from 8 you'd be writing custom migrations for your content types, which is a lot for a first drupal project

Since you want a new look anyway, the theme is a separate job either way. an old 8 theme won't survive to 11, so plan on a new theme (olivero or a starterkit-generated one) regardless of which path you pick

My order would be: back up db + files, run upgrade status on a copy, see how much custom code there is. if it's a pile of custom modules nobody understands, that's when a fresh build starts to win

One honest question to ask before any of it: what does the site actually need from drupal? if it's a handful of pages and a news section, and you'll be the only person maintaining it, it's worth comparing the upgrade effort against a simpler setup. if it has complex content, permissions, multiple editors, drupal earns its keep