If you are planning an upgrade from Drupal 8 to Drupal 9, I strongly recommend that you uninstall the contrib module multiversion before you update the core to the latest 9.x version.
Some of the contrib modules that require the multiversion module are: Deploy, Workspace, Replication. These modules will be automatically uninstalled as part of this process too.
1. Install the Multiversion Remover.
The module Multiversion Remover plays an important role on this process, so we need to install it:
composer require 'drupal/multiversion_remover:1.0.x-dev@dev'
drush en multiversion_remover -y
2. Delete replication, replication_log and workspace entities.
Go to the following URLs and delete all the entities:
https://YOUR-SITE_URL/admin/modules/uninstall/entity/replication
https://YOUR-SITE-URL/admin/modules/uninstall/entity/replication_log
https://YOUR-SITE-URL/admin/modules/uninstall/entity/workspace
3.-Implement a hook update.
Copy the code from this repo and paste it in a hook update in one of your custom modules.
Clear caches from the backend https://YOUR-SITE-URL/admin/config/development/performance or using the terminal drush cr
4.- Run the Drupal updates
We need to execute the hook update that we implemented in the previous step, so we have to run the drupal updates from the browser https://YOUR-SITE-URL/update.php or using the terminal drush updb -y
Important: While the updates are running, we need to check if the entities that we deleted in a previous step are not recreated, otherwise, we will have to re-delete them.
Remember, it has to be done before the updates process ends.
URLs to check if the entities were not re-created while running the updates:
https://YOUR-SITE_URL/admin/modules/uninstall/entity/replication
https://YOUR-SITE-URL/admin/modules/uninstall/entity/replication_log
https://YOUR-SITE-URL/admin/modules/uninstall/entity/workspace
Most likely, you will get an error, that is ok.
5.- Execute multiversion remover functions.
You need to execute the following commands, to complete the removal process:
drush php-eval "multiversion_remover_uninstall_multiversion_suite()"
drush php-eval "_multiversion_remover_purge_multiversion_kvp()"
6.- Uninstall the Multiversion Remover module.
At this point, the Multiversion Remover module did its job and we can remove it from the project.
drush pmu multiversion_remover -y
composer remove drupal/multiversion_remover
Top comments (7)
Following the procedure, I got a WSOD after doing this step:
YOUR-SITE-URL/admin/modules/uninst...
I forged ahead anyway and everything else seemed to work OK. Thanks
Glad that it worked.
@davo20019 I'm finally trying to follow your example, but your repo is missing. :( Is it somewhere else?
@kenrbnsn I jus updated the post, and the link is this one: github.com/davo20019/multiversion-...
@davo20019 I followed the directions and it seemed to get rid of multiversion and all of the associated modules. I've updated my site to 9.5.7, but when I do a
"$ drush updb -y"
I get this error:
What to I have to do to get rid of that error?
@davo20019 Your gist link is broken for the update hook repo code?
@tonygutierrez you many not longer need this, but I just updated the link. github.com/davo20019/multiversion-...