magento2 – Uninstalling Ultimo Infortis theme Magento 2

Specific to Infortis Ultimo removal in Magento 2, I did the following (slightly different from Marcwales’s answer my goal is to remove it entirely not to disable anything), probably a bit over but this worked step by step, I was uninstalling Ultimo from Magento 2.3.6-p1 and this is all before touching a new theme installation:

do this on a test / dev server site copy first, not your live site!
I disabled Crons and popped my dev copy site in maintenance mode to avoid crons running errors which would happen during this process:

Set Theme in Magento back to Luma (Content>Design>Configuration), and then
via ssh to clear everything to be sure:

rm -rf generated/metadata/* generated/code/*
bin/magento setup:upgrade
bin/magento setup:di:compile
bin/magento setup:db-schema:upgrade
rm -rf pub/static/*
bin/magento setup:static-content:deploy (or your store language options)

nb: observe, no deployment of ultimo theme.

Clear/Flush Cache

In Magento admin, remove any code on the home page, other pages / widgets / static blocks involving Infortis extension code and just delete the static blocks specific to Infortis (i.e slideshows, you’ll need to start afresh in new theme anyway for those most likely!).

via ssh delete the following directories and all contents:

appcodeInfortis
appdesignfrontendInfortis

(ideally just leave “pubmediawysiwyginfortis” alone, it’s not massive, agreed SEO reasons for this)

Run the following commands:

rm -rf generated/metadata/* generated/code/*
bin/magento setup:upgrade
bin/magento setup:di:compile
bin/magento setup:db-schema:upgrade
rm -rf pub/static/*
bin/magento setup:static-content:deploy

Clear/Flush Cache

You should find your front end working but product images may be missing, this is because of changing themes & image specs, you’ll need to re-generate the images for your entire website. Don’t bother with this if you are installing a new theme because you’ll just need to do it all over again at that point. Just check your pages for errors calling Infortis extensions, these are likely page content, static blocks or widgets and just disable / remove or amend as needed.

Database clean up (this is a lot of rows give an hour or so for this careful work, compiled list after some analysis):

Delete rows for Infortis/base and Infortis/Ultimo from the "theme" table
Delete every row containing Infortis from the "authorization_rule" table
Delete every umm_ entry row from the "eav_attribut" table
Delete every row with path starting "theme_settings" from the "core_config_data" table
Delete every row with path starting "theme_design" from the "core_config_data" table
Delete every row with path starting "theme_layout" from the "core_config_data" table
Delete every row with path starting "ultraslideshow" from the "core_config_data" table
Delete every row with path starting "ultramegamenu" from the "core_config_data" table
Delete every row with Infortis referenced from "setup_module" table.

At this stage, if you do a search on your entire database for “Infortis”, you may find some static blocks or page content has references to Infortis, don’t change that here, you need to clean that up via the backend, just note them for reference / to-do’s later on.

Ignore any search results for logs, but note any tables related to optimization extensions you may have, any optimization extensions need to be cleared and re-set including any cache extensions.

Run the following:

rm -rf generated/metadata/* generated/code/*
bin/magento setup:upgrade
bin/magento setup:di:compile
bin/magento setup:db-schema:upgrade
rm -rf pub/static/*
bin/magento setup:static-content:deploy
bin/magento indexer:reindex
bin/magento cache:clean && bin/magento cache:flush && bin/magento cache:enable

Check admin, from the notes on your database cleanup review pages, static blocks, widgets and any optimization extensions. It’s worth switching Magento to dev mode just to double check there are no bugs/errors showing there front end of the site.

You should find now the only thing not working is product images but generally everything else works. Images are straight forward to regenerate, from admin back end cache, delete all generated image files and run the following in ssh:

bin/magento catalog:image:resize

But with big stores the above is time consuming. If you are installing and configuring a new template just go ahead with that first to avoid having to generate the images all over again.

I hope this helps – exhausting!