I require to upgrade the Moodle from 3.5.17+ to 3.10. At this moment I have themes installed on 3.5.17+ essential and bootstrapbase. These themes are not supported starting on Moodle 3.6 and will crush the moodle. I would need no uninstall these 2 themes before I do the upgrade. However, at Moodle administrator plugin view there is no button uninstall next to these themes. What are my options here? 
Moodle upgrade from 3.5.17+ to 3.10 with themes essential and bootstrapbase
Re: Moodle upgrade from 3.5.17+ to 3.10 with themes essential and bootstrapbase
Now, before diving in, what are the versions of you system software? See Before you post.. read this... Also https://docs.moodle.org/405/en/Upgrading and make sure that Site administration > Server > Environment is green. Watch the drop-down there to check whether the platform is 3.10 ready.
Is there a specific reason why you go for 3.10, not 3.11 LTS, which was supported much longer?
This chart helps to keep an overview on various versions: http://www.syndrega.ch/blog/#php-and-dbms-compatibility-of-major-moodle-releases.
Re: Moodle upgrade from 3.5.17+ to 3.10 with themes essential and bootstrapbase
Operating System: AlmaLinux 8.9 (Midnight Oncilla)
Server: PHP 7.3.20
Database: Maria DB 10.5.24
Moodle: 3.5.17+
For some reason server and Database cannot be upgraded further. And my aim is to upgrade to the highest Moodle version possible. The plan was to upgrade to 3.10 and then to 4.0. Judging from the https://moodledev.io/general/releases/4.0 the server and database meets the requirements for upgrade 4.0(MariaDB 10.2.29, PHP version: minimum PHP 7.3.0 ). I am open to suggestions how to do the upgrade/upgrades more optimal. I do not have any specific preferences for Moodle version specifically. As long as it is safe and newest this system can support is good enough for me.
As for Site administration > Server > Environment is green I have
This is the first time I touch this project and I cannot comment much why is that so.
Secondly - The plugins page will mark them "Missing in disk" but they cause no damage. You can later delete the records from the database. - understood.
Suggestions regarding upgrading steps.
How critical is the error in testing environment? I myself do not know how to test it. However, the web part seems to work and there is no complains from admin of this site.
All info above is about testing server. Eventually, the Moodle upgrade must be done also on the production server:Operating System: AlmaLinux 8.9 (Midnight Oncilla)
Server: PHP 7.2.24
Database: Maria DB 10.5.26
Moodle: 3.5.17+
I did the upgrade 3.5.17+ to 3.10 with copying themes from older to newer version(as per documentation https://docs.moodle.org/310/en/Upgrading). There were no missing files, all checks were green and it seemed the upgrade should work. However, after updating database, the site crashed with error 500. I have no idea how to check errors myself. My admin colleague searched for logs what went wrong, and then I came across the fact that themes essential and bootstrapbase(and others, but removing them was no problem) is not supported starting Moodle 3.6 and will crush the server. So my first thought is to remove them before doing the upgrade. Now server and database is rolled back. Came here for help.
Found an essential README file which explained how to uninstall it.
Uninstallation
==============
1. Put Moodle in 'Maintenance Mode' so that there are no users using it bar you as the administrator.
2. Change the theme to another theme of your choice.
3. In '/theme/' remove the folder 'essential'.
4. Put Moodle out of Maintenance Mode.
The second part seems confusing.
Re: Moodle upgrade from 3.5.17+ to 3.10 with themes essential and bootstrapbase
About the target Moodle version: Under the system software you have, my favorite would be 3.11 LTS, since it was LTS.
Even without that, the transition to Moodle 4 was a "generation change" with lot of visible (look-and-feel) changes. Some ware more happy than the others. ;) My personal choice would be to spend some time in 3.11 LTS and aim for 4.3 as the next target. 3.11 > 4.3 long jump is supported. (See the chart) Some ups-and-downs of the initial 4 versions were ironed out by then.
Re: Moodle upgrade from 3.5.17+ to 3.10 with themes essential and bootstrapbase
What settings must I change so that this theme does not come back?
As for 3.11 version I require to upgraded to moodle 3.6 first and also php extension Sodium is needed.

Re: Moodle upgrade from 3.5.17+ to 3.10 with themes essential and bootstrapbase
I did input this into the config.php and that worked. Uninstall button showed up next to essential plugin.
That is the clean method.
However, after deleting it and updating the database, essential theme was still there. Deleting Essential directory manually also gave the same response.
Yes, as you discovered telling Moodle that the theme is no more needed and removing the theme from the code tree are two separate steps. They need to be executed in that order, resp. after step 1 Moodle will tell you when to do step 2.
It seemed that the essential theme was being deleted and after updating the database, the theme was back.
Do you say, Moodle "remembers" the code of the plug-in and dump it back?
What settings must I change so that this theme does not come back?
No "settings". It is the procedure described above.
Re: Moodle upgrade from 3.5.17+ to 3.10 with themes essential and bootstrapbase
Is there an .htaccess file at the root of your moodle code?
If present, that was put there by cPanel and sets the version of PHP to use as per directory/folder (ie, your moodle code). Depending upon where hosted, hosting provider might have in .htaccess rules for PHP but also LightSpeed PHP. The LightSpeed PHP is provided by hosting provider and not the same as the PHP that comes from true PHP.
AlmaLinux 8 has repositories for software ... including PHP. The package manager for AL8 is now dnf (dandified yum).
From command line as root and from any location, issue this:
dnf search php7\* [ENTER]
You should see all the versions of PHP 7 + php extensions offered by AL8's repo.
Do the same only change the 7 to an 8:
dnf search php8\* [ENTER]
That should so a long list of all version 8's - 8.0, 8.1, 8.2, 8.3, and 8.4.
Study Mr. V's chart - moodle version row and min/max for PHP version.
Also in Moodle, go to Admin -> Server -> Environment check
update the component.
Then in the drop down list for moodle version select each higher version of Moodle - screen should refresh and show greens if server meets requirements for that version of Moodle code.
Note when begins to show reds ... that means BEFORE you attempt upgrading to that version of moodle, PHP must be upgraded ... ditto for DB.
Also note additional at the bottom of that page. Might say max_input_vars needs to be at least 5000.
Additional info:
https://moodledev.io/general/releases
One has to map out what/when as you do a march of moodle code to avoid issues.
Also ... it is possible to do the upgrades via command line only using scripts in code/admin/cli/. Takes web services out of the loop - web services could also be in need of tweaking and CLI only upgrade avoids that.
'SoS', Ken
Re: Moodle upgrade from 3.5.17+ to 3.10 with themes essential and bootstrapbase
I had no matches found after this one.
dnf search php7\*
If the system all ready has Server: PHP 7.3.20 and Moodle: 3.5.17+. And 3.5.17+ Moodle does not support 7.3.20, but only as high as 7.0, then can I upgrade Moodle before downgrading php?
Re: Moodle upgrade from 3.5.17+ to 3.10 with themes essential and bootstrapbase
See/study Mr. V's chart:
http://www.syndrega.ch/blog/#php-and-dbms-compatibility-of-major-moodle-releases
This gets to be tricky in that to run your version of moodle 3.5.17+ PHP 7.2 is max.
The only way to upgrade the moodle is 'blindly' and I would do that via Git versioning in a 'build' directory for version 3.6 of moodle code. Copy back into build config.php + plugins - but not Essentials/Boostx themes. Also if you have any .htaccess file in original code directory copy that as well and check it for it might point to the older version of PHP.
Then swap the 'build' directory with your document root ... example code is in /var/www/html/ ... mv html /root/oldhtml then mv build /var/www/html
Check ownerhips permissions on the new html directory.
Then pull the trigger on upgrading via command line with scripts in newhtml/admin/cli/ ... php upgrade.php
Then check site ... maintenance mode off ... run admin/cli/cron.php because cron has not run in a while now. Do checks.php as well.
Address any issues that checks.php reports.
Once that checks out and everything ok, then 'march' the moodle code via git keeping an eye on that chart - as well as doing environment check from Admin Server Environment - update component.
Wouldn't do hyperjump on moodle versions ... take it slow and steady.
After each successful hop upwards, site backup which consist of an archive of code + database dump + minimal moodledata/filedir. Those backup files named with core version number in the filenames so that, if need be, one could restore ground gained in case an upgrade fails for some reason.
Not fun but doable!
Git reference:
https://docs.moodle.org/405/en/Git_for_Administrators
For upgrading php + extensions at appropriate time ... just before pulling trigger on upgrading Moodle, install 3rd party repo for higher versions of PHP - Remi
https://idroot.us/install-remi-repo-centos-rocky-linux-and-almalinux/
'SoS', Ken
Re: Moodle upgrade from 3.5.17+ to 3.10 with themes essential and bootstrapbase
Re: Moodle upgrade from 3.5.17+ to 3.10 with themes essential and bootstrapbase
You mean git is not installed? Then install it!
dnf install git
Here's the doc ... it includes both ways
https://docs.moodle.org/405/en/Upgrading
If one compares how git works and the 'oldway' there are fewer moving parts using git that have to be done by a human - which means prone to human error.
The initial git setup is a combo of old and new but after that it's 3 git commands to upgrade core code ... as opposed to how many steps the old way?
The choice is yours.
Sooooo ...
SoS ('Spirit of Sharing'), Ken
Re: Moodle upgrade from 3.5.17+ to 3.10 with themes essential and bootstrapbase
That is where Git starts Git_for_Administrators.
In fact, that is where fun begins!
Re: Moodle upgrade from 3.5.17+ to 3.10 with themes essential and bootstrapbase
I talked about PHP ... don't forget DB version as well.
Reason for themes showing up after you had supposedly deleted .. there are references to that theme in mdl_config_plugins table.
Essentials theme was massive ... 600+ settings if I recall correctly.
You must delete rows that refer to that theme in mdl_config_plugins.
Also, other plugins ... you should get a list of addons installed and check for higher versions in Moodle.org plugins site. Not all plugins have made it to version 4 of core. Personal policy ... if a plugin can't be upgraded, delete it ... while an addon might work on one version higher, more than likely, down the road during your march it might be a stopper on upgrading core.
'SoS', Ken
Re: Moodle upgrade from 3.5.17+ to 3.10 with themes essential and bootstrapbase
Look in moodlecode/admin/cli/. There might be a CLI only script called 'uninstall_plugins.php.
Executing like: php uninstall_plugins.php should bring up a help screen and show options/switches to the script.
Essential theme hasn't been support for some time now.
You can force the theme to use by adding a line to your config.php file:
$CFG->theme='boost';
Matter of fact, when I do command line upgrades across major versions I now add that line to avoid issues with 3rd party themes no longer supported which have the potential to mess up an upgrade.
Mr. V is correct, deleting the essential directory from theme directory will result in 'missing from disk' and clicking the button at the bottom to update moodle should remove tables in DB that reference that theme. But, it might not also remove rows from mdl_config_plugins table. That table you might need to remove rows that reference essential theme settings ... near 700 of them.
Since you will be working with DB directly, always advise to do a DB dump backup, just in case.
'SoS', Ken
Moodle upgrade from 3.5.17+ to 3.10 with themes essential and bootstrapbase
Hello, Raimonds! 😊
The fact that you are unable to uninstall them via the interface makes complete sense because these themes are active or related to sub-themes in use on your Moodle. Go to the Moodle administration menu and select another theme compatible with the version you are running.
After selecting the new theme, try deleting these themes.
Eduardo Kraus
Teacher and programmer 👨💻