Installation help

Picture of Gunilla Brattberg
Downgrade error when upgrading to 2.5.2

I try to upgrade from 2.2.9 to 2.5.2 and get the following error message:

It is impossible to downgrade mod_wiki från 2012061701 till 2012061701

Debug info: Error code: cannotdowngrade

Stack trace:
  • line 313 of /lib/upgradelib.php: downgrade_exception thrown
  • line 69 of /mod/wiki/db/upgrade.php: call to upgrade_plugin_savepoint()
  • line 664 of /lib/upgradelib.php: call to xmldb_wiki_upgrade()
  • line 381 of /lib/upgradelib.php: call to upgrade_plugins_modules()
  • line 1586 of /lib/upgradelib.php: call to upgrade_plugins()
  • line 394 of /admin/index.php: call to upgrade_noncore()

I can´t find any later wiki-module to download and install.

How do I solve this problem?

Average of ratings: -
Picture of Shantanu Sikdar
Re: Downgrade error when upgrading to 2.5.2

Hello Gunilla,

I hope you’re doing fine. We’re here to help the fellow Moodlers; hence I’m giving it a shot to answer your query.

Mod_wiki is a default Moodle plug-in. The error message “cannot downgrade” is generated when someone tries to upgrade Moodle from a higher version to a lower version and this is known as  downgrade. But as I understand this shouldn’t have occurred in your case. May I know whether any of your upgrade attempts failed previously? The reason behind asking this question is the mod_wiki version stored in your database is possibly higher than the version of the mod_wiki plug-in.

I would recommend you first to upgrade your Moodle instance from version 2.2.9 to any 2.3 version and then upgrade it directly to 2.5.2. This’ll be the correct approach and following this process the schemas and structures of Moodle database can be maintained properly. At the same time, will it be possible for you to first check and then provide us the mod_wiki plug-in versions along with the other versions stored in your database?  This’ll help us to give you a better solution.   Please check below for further reference: To check mod_wiki plug-in version:

Please visit your Moodle folder and then browse the given path below:


$module->version   = 2012112900;  //where 2012112900 is the wiki version of plug-in file.

To check the database of your mod_wiki version:

Please visit your Moodle database; open the table mdl_module. In the column- “name” and search the value “wiki”. The column next to “name” shows the version of plug-in stored in your database.

I hope this will resolve your problem! I Wish you a smooth path ahead.

Happy to help you!



Average of ratings: -
Picture of Gunilla Brattberg
Svar: Re: Downgrade error when upgrading to 2.5.2

Thank you so much for the answer!

In the moodlepackage the following versions are used:
Earlier Installation 2.2.9 mod-wiki version 2011112900
New installation 2.5.2 mod-wiki version 2013050100

In the databases I find mod-wiki version 2011112900 in both the earlier database and the new one which did not upgrade properly with the wiki-error-message.

When I went from 1.9.7 to 2.2.9 I first upgraded to 1.9.19 but now when I have passed 2.0 I thought it would be possible to direct from 2.2.9 to 2.5.2.

My installation 2.2.9 works fine with one exception. The student can´t see my feedback in the assigment module and that is the reason why I want to upgrade to a later version. My webhotel didn´t have InnoDB until now and that´s the other reason I want to upgrade.

May be the only way to get a proper 2.5.2 installation is to do it stepwise??



Average of ratings: -
Picture of Gunilla Brattberg
Svar: Re: Downgrade error when upgrading to 2.5.2

Hi Shan,

I have now done Another trial to first upgrade from 2.2.9 to 2.3.9. This time I have problems with another module - journal.

Journal/mod/journal       2007101509   2013091800

  • Moodle 2013051400

Will be upgraded

With this Plugin Control error the the upgrading process stops. I have installed the journal version 2013091800 in the mod directory, but when I have a look in the database I find journal 2007101509.

It was exactly the same problem when I tried to upgrade to 2.5 but then it was the wiki module that was the problem.

What do I have to do?



Average of ratings: -
Picture of Gunilla Brattberg
Svar: Re: Downgrade error when upgrading to 2.5.2

In the upgrading manual I read:

"If an out-of-date add-on causes your upgrade to fail, you can usually delete the add-on code rather than uninstalling it from within Moodle so that the data associated with it is not deleted."

How do I "delete the add-on code"?


Average of ratings: -
Picture of Gunilla Brattberg
Svar: Re: Downgrade error when upgrading to 2.5.2

Finally I have suceeded to upgrade från 2.2.9 to 2.3.9, but all the links to pdf-files and images are broken!

Do I have to upload all these files again or is there any easier way to relink these files?



Average of ratings: -
Picture of Shantanu Sikdar
Re: Svar: Re: Downgrade error when upgrading to 2.5.2

Dear Gunilla,

I’m really sorry for such a late reply.  It’s good to find that our suggestion came of your help. It’s a nice gesture to engage in solving each other’s problems as it creates a learning atmosphere.

It seems your upgrade was successful, but it was not properly executed for which the links and the images were broken.  May I know whether you’ve  changed the path of your Moodledata directory or you have created a new Moodledata directory? When an image or pdf is uploaded in Moodle the data/files are stored in Moodle data folder with some hash codes.  As a result of this, when an  upgrade takes place Moodledata folder gets upgraded simultaneously including the path of the link.

I would suggest you to do the upgrade once more from 2.2.9 to any preferred version of 2.3. Please make sure that the same Moodledata directory associated with version 2.2.9 should be used. You’ll get Moodledata directory path from config.php file in your Moodle instance folder i.e., your_Moodle_folder/config.php

Also, I would suggest you, if you get the plug-in errors before you start upgrading, you’ve  two options to deal with:

1.) Either you completely delete the plug-in folder from that path which is displayed on the screen; for example, in your screenshot you’ve  got the error in mod_journal,   in order to delete that folder, you meed to visit the path given below:

your_Moodle_folder/mod/journal, then delete the journal folder and reload the upgrade page.

(Note:- deleting the plug-in won’t upgrade the plug-in database further).

2.) Or you have to download the new plug-in which is compatible with the new upgrading Moodle version. After performing this, copy and replace the folder with the existing old plug-in folder.

I hope this resolves your issue. Please feel free to revert back for any further query.

Warm Regards


Average of ratings: -