I wrote previous pages on using Gemini to migrate from Drupal 9 to Drupal 10.
Due to a variety of structural and behavioral changes brought along since drupal6 in 2011 for my first version of papierlogik, I have been learning and miserably building and at least partially maintaining this website since with a huge amount of issues. Knowing that a drupal10 structure contains around a hundred thausand files just to work, I have been very pleased to discover how efficiently Gemini or another AI can help today.
This remains a long an d tremendeous work but it is definitely educative regarding fundamental concepts and the use of newer and more efficient tools and methods.
At this day, I could fix most of my running drupal 9 production issues,upgrade to drupal 10 and start solving many issues regarding drupal modules, libraries, php and other updates to be done, but also clean all along my site from unused modules and other outdated or unmaintained add-ons.
It occured to be insufficient to fix issues with Menu Block module and other jquery modules, which revealled that a key problem that AI could not warn about was that the structure of the site folder on the server was also completely different from, drupal 9 to drupal 10.
It took me some time to have him understand this, and know he seems to propose a comprehensive but quite complex strategy to fix this. It is not really complex actually, but it is a long series of procedures and from my experience, AI and I are still not good enough as a team to find the most straightforward path to run all this and there are many chance to discover ne issues on the way and loop back with permanent risks of getting stuck in a loop with the AI response.
Let’s try this in any case, starting at 16:27
It Started well and backed up the current prod version, however a php issue prevented WAMP64 to import my backup sql into the new fresh drupal10 site and Gemini launched me then in a need for reinstalling Wamp.
At such stage as of Aug 25 with AI it is essential to understand they have very bad “memory” and it is easy to run 1 or a few prompts efficiently in a row when each is well written, but it is getting harder as soon as the initial route deviates too much.
So I asked him to update and setup a new strategy to solve the initial sql import problem and be able to fusion a fresh and clean drupal10+ site with my backup database
The Full Migration Strategy
This plan assumes you have at least two Drupal sites in your www folder. We will use drupal_papierlogik for your old site and drupal10_new_plk for your new, clean Drupal 10 installation.
Step 1: Backup All Your Sites
-
Backup Databases: For each of your Drupal sites, you must create a database backup file. To do this, navigate to each site’s root directory in your command line and run:
Bash
c:\wamp64\bin\php\php8.3.14\php.exe vendor\drush\drush\drush sql:dump --result-file=database_backup.sqlThis command will create a file named
database_backup.sqlinside that site’s folder. -
Backup Site Files: Copy your entire WAMP
wwwfolder to another location on your computer. This ensures you have a backup of all your Drupal sites’ code, themes, modules, and user-uploaded files.
Step 2: Reinstall WAMP64
-
Uninstall WAMP: Completely uninstall WAMP64 from your computer. This is the only way to resolve the underlying permissions and execution issues.
-
Reinstall WAMP: Download the latest version of WAMP64 from the official site and install it as an administrator.
Step 3: Restore Your Drupal Sites
-
Restore Code: Copy your backed-up Drupal site folders (including your
drupal_papierlogikanddrupal10_new_plkfolders) from your backup location back to thec:\wamp64\wwwdirectory.
Step 4: Prepare the New Drupal 10 Site (drupal10_new_plk)
-
Create Database: In your new WAMP installation, open phpMyAdmin and create a new, empty database. Name it exactly the same as the database from your old
drupal_papierlogiksite. -
Copy Database Backup: Copy the
database_backup.sqlfile from yourdrupal_papierlogikfolder to your newdrupal10_new_plkfolder.
Step 5: Import the Database
-
Import the Database: Open your command line as an administrator and navigate to your new Drupal 10 site’s root directory (
c:\wamp64\www\drupal10_new_plk). -
Run the import command:
Bash
c:\wamp64\bin\php\php8.3.14\php.exe vendor\drush\drush\drush sql:cli < database_backup.sqlThis command should now work without the
Accès refuséerror because you have a clean WAMP installation with correct permissions.
Step 6: Migrate Files and Run Updates
-
Copy Custom Files: Copy your
sites/default/filesfolder from the olddrupal_papierlogikfolder to the newweb/sites/default/filesdirectory in your fresh installation. -
Copy Custom Modules/Themes: Copy any custom modules or themes you’ve developed from the old
modules/customandthemes/customfolders to the newweb/modules/customandweb/themes/customfolders. -
Update and Rebuild: Run these final commands in your new site’s folder to complete the migration:
Bash
c:\wamp64\bin\php\php8.3.14\php.exe vendor\drush\drush\drush updb c:\wamp64\bin\php\php8.3.14\php.exe vendor\drush\drush\drush cr
This comprehensive plan addresses all the points of failure we’ve encountered and will give you a fully functional and standard Drupal 10 installation.