My notes on migrating a Drupal 7 site to Drupal 9.
Prepare local copy of drupal7 site.
- Clone repo.
- Copy files directory and database from live site.
- Check private file system and tmp paths in configuration.
- Uninstall and remove all unnecessary and unused modules.
- Switch theme to Bartik. Configure block structure.
- Uninstall and remove unnecessary themes.
- Clear caches.
Install new blank drupal site.
- Create empty database and db user.
- Create new drupal site using composer:
composer create-project drupal/recommended-project site-folder
- Fix file permissions to ensure the webserver has write permissions.
- Run install process.
- Delete Comment field from all content types then uninstall comment module.
- Install required modules (Antibot, Honeypot, EU Cookie Compliance).
- Install Olivero theme and apply patch to fix external links in menus
- Install local copy of drush using composer.
- Update database and rebuild cache.
Start Migration.
- Check migration modules are enabled on new drupal site.
- Navigate to /upgrade on new site and check required preparation steps.
- Put site into maintennce mode with:
drush sset system.maintenance_mode 1 --input-format=integer
- Click on Continue to get to the next page.
- Enter source database details and full local path to source site (e.g.
/var/www/site
).
- Review modules that won't be migrated and then click to continue.
Fix configuration.
- Rebuild caches and update database.
- Dump database to fix file and image paths that should now point to
sites/default
not sites/site_name
.
- Re-add views. Re-add menu items.
- Fix default date formats for Date Medium (date only) and Date Short (time only).
- Fix text formats in content types. Delete text formats no longer needed.
- Adjust account names and roles as required.
- Install new theme. Place blocks in required regions.
- Uninstall Migrate modules and delete migrate tables from database.