Upgrade Issues - 1.9 > 2.0+

Upgrade Issues - 1.9 > 2.0+

by Joe Mars -
Number of replies: 18

Hello fellow Moodlers,

I was recently put in charge of a horrific task of working with a platform that I have never used before at my Charity... and also updating it to a much newer version.  So with that, let me get into it.


To start:

We are using Moodle v1.9.x

Hosting is being done by SiteGround.  I am also unfamiliar with a majority of SiteGrounds tools and capabilities due to my preference of working on the network and the hardware over web design and development.

SQL is a Language I really should learn but have had no need of it in the past until now with Moodle.

PHP is set to 5.3.29.


Issue Time:

So I was trying to follow a few different upgrade guides as everything is slightly different and the guide on SiteGround is for more recent versions.  However I can't follow an older guide as I don't directly have the same steps with it not being hosted here.


First thing I did was do a FULL backup of our web Root folder. Copy anything and everything.  Back is stored locally and untouched by any editing.

Second thing I did was update the PHP from 5.2.x to 5.3.29.   I did check 5.4 but it started to give a non critical error so i continued with 5.3.29.

Next I Backed up the SQL DataBase.

Fourth thing I did was download Moodle 2.0, unzip and Upload via FTP to the moodle folder on the site.   I was able to get the /moodle/admin page and it kept telling me to update the SQL DB to UTF-8. 

At this point I did get SiteGround support involved to help me Convert the DB to UTF-8.  They performed a Backup then add a new DB and restored with changing to UTF-8.

They said I would need to change the DataBase in the config file to the new name. I did (after backing up again) make a change to the Config.php and changed the DB name.


Since then, I am now getting a different issue with it basically not finding the tables or finding the new information?  I'm not sure and that is why I am here asking for help. 


  • Module "feedback" (2010112302) could not be installed. It requires a newer version of Moodle (currently you are using 2007101509, you need 2010080300).Scroll to next warning





All help is greatly welcomed and appreciated! 
And yes, my end goal is to be at the latest version.

- Joe


Average of ratings: -
In reply to Joe Mars

Re: Upgrade Issues - 1.9 > 2.0+

by Usman Asar -
Picture of Plugin developers Picture of Testers

Joe,

you mentioned 1.9.X, what's the value of X here?

as if you are upgrading, then your upgrade path should be, 1.9.x to 1.9.19 (which was last version of 1.9 series) first, then proceed to 2.x and so on.

In reply to Joe Mars

Re: Upgrade Issues - 1.9 > 2.0+

by Ken Task -
Picture of Particularly helpful Moodlers

+1 for Usman's posting.   Must go to 1.9.19+ before attempting upgrading to 2.0.10.

Then it becomes a 'march' and the strategy is to move upwards in versions but not so far that you've attempted to upgrade a moodle that has higher requirements for PHP and MySQL.

See: https://download.moodle.org/releases/legacy/

and note the PHP and MySQL requirements for versions.

Then make sure that SiteGround can provide the versions required *before* making the step.

The type of account you have might not allow you to upgrade MySQL to MySQL 5.5.31 when getting to the point on is upgrading to 2.8.12.

There are some catch 22's in migrating/marching a 1.9 upwards ... while you get all courses and users in the system up to 2.x, the file system is now in legacy.   All courses have Legacy file system ... which is not the new file system in 2 and 3.    Only new courses in 2 will have no legacy file system.

IF there are additional plugins/add-ons those could be problematic ... a look at the Activities, Blocks and Filters in the 1.9.x site doesn't tell you which ones are 'core' ... those that come with the Moodle code downloads ... and which ones are add-ons.    You might have to remove in-compatible plugins at some stage in the 'march'.

Something else to consider ... IF the issue truely is time.

Make no user backups of the 1.9.x courses as they exist right now and restore those courses to a fresh 2.highest or 3.highest.    Catch 22 there ... no users will be included in the restore regardless of what you do using backup/restore, but one could get them in via CVS.   Then assign them to courses - minimal Teachers given Teacher role in their courses.   Students could self register and enroll themselves into courses - or once Students have accounts, Teacher can enroll the students.

There's enough of a difference that Teachers/Students will need some re-training in 2 and 3.   So they'll have to do that anyway.   Using the restore method will force teachers to rebuild some things and learn the new system.

Yet another alternative ... make backups of the 1.9 courses.   Download them and unzip locally.   In the unzipped backup, one will find a files directory that contained all the files in a course.    They can be re-uploaded while teacher is rebuilding the course ... AND a two + for this is: a) no legacy file system b) teachers have to learn the new system as they go.

So you have options ... some not so good ... but ....  this is kinda like having Windows 95/8 and moving to Windows 10?   OR Mac OS 7 or 9 to the latest MacOSX?

'spirit of sharing', Ken

In reply to Ken Task

Re: Upgrade Issues - 1.9 > 2.0+

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
Hi

Sit tight for a bumpy ride!
wink

Question: You said, you want to upgrade to a much newer version. OK, 2.0 is newer https://docs.moodle.org/dev/Releases?redirect=no#Moodle_2.0, but not new in today's (2016) standards. Is there a particular reason why you need 2.0 or your aim it to follow the Moodle version march, which is at 3.1 as of today?

As others have pointed out, independently of all that, you have to update your 1.9.X to 1.9.latest which is 1.9.19 https://docs.moodle.org/dev/Releases?redirect=no#Moodle_1.9. This is how you do it: https://docs.moodle.org/19/en/Upgrading. *Warning: Don't skip the very first step https://docs.moodle.org/19/en/Upgrading#Before_you_upgrade_your_site_for_real. Moodle upgrade has no Undo button!)*
In reply to Visvanath Ratnaweera

Re: Upgrade Issues - 1.9 > 2.0+

by Robert Brenstein -
What others say, just to stress that you should not be going from 1.9 to 2.0 but from 1.9 to 2.2 immediately and then to whatever version you want to reach. In many circumstances, it is smarter to leave 1.9 running as it is and start with the new version new, building or rebuilding there your courses. Moodle has changed quite a bit after all.
Average of ratings: Useful (1)
In reply to Robert Brenstein

Re: Upgrade Issues - 1.9 > 2.0+

by Joe Mars -
I want to thank you all for your helpful and insightful replies.  Since posting this I have been busy and deployed offsite to Baton Rouge, LA to aid in the flooding there until now.  I will review all the help you have given, return with additional information as well as follow the advice given.  Thank you again, and I will hopefully be able to post an update later today with more.
In reply to Visvanath Ratnaweera

Re: Upgrade Issues - 1.9 > 2.0+

by Joe Mars -

Hi Visvanath,

My goal is to catch up to the latest stable version.  Just I need to start from the beginning. 


I know many have suggested to just start fresh with the newest version.   It probably would be best but not entirely the easiest.

We are fine with having some of the legacy files and such.  With time we can transfer the courses as well as the students over.  Just how we use this with the limited number of people that actually use it, I feel we are better off progressing through the upgrading crawl.

In reply to Joe Mars

Re: Upgrade Issues - 1.9 > 2.0+

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
Hi

You wrote:
> My goal is to catch up to the latest stable version.
> [...]
> We are fine with having some of the legacy files and such. With time we can transfer the courses as well as the students over.
>
> Just how we use this with the limited number of people that actually use it, I feel we are better off progressing through the upgrading crawl.

Then the path is through 1.9.latest and 2.2.latest, as already suggested.

I see you've done the 1.9.latest update. But the rough one is the upgrade to 2.2, mainly due to the new architecute of Moodle and also re-doing all the plug-ins. That is why some people advise to forget upgrade and transfer course content by https://docs.moodle.org/19/en/Course_backup and https://docs.moodle.org/22/en/Course_restore (or https://docs.moodle.org/en/Course_restore). It is possible that your 1.9 site was simple enough that the upgrade will work.
In reply to Joe Mars

Re: Upgrade Issues - 1.9 > 2.0+

by Joe Mars -


Here is where I stand:

I am updating to 1.9.19. It looks like it will work, 

I have Green on all the Checks and I can continue with the updating procedure. (See Attachment)


Where I do get an odd delay or error is the Plugins Check page.   This is the Text I receive but there is no button to click or continue.

The following tables show the modules, blocks and filters that have been detected in your current Moodle installation; They indicate which plugins are standard, and which are not. All non-standard plugins should be checked and upgraded to their most recent versions before continuing with this Moodle upgrade.

Attachment Moodle1.9.19.jpg
Attachment PluginCheck.jpg
In reply to Joe Mars

Re: Upgrade Issues - 1.9 > 2.0+

by Emma Richardson -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers

Do you have your permissions set correctly on the new moodle folder?  I suspect that the webserver cannot see your folders...

In reply to Emma Richardson

Re: Upgrade Issues - 1.9 > 2.0+

by Joe Mars -

I am trying to check on that now.  I don't believe there are any restrictions on the folder.   

As I said earlier, I was thrown into this project without much SiteGround background or Moodle so this has been a big learning curve to catch up on things that haven't been touched in probably 7+ years.  I was tossed this because my boss doesn't even know what is going on and she feels it would be better in my hands.


I's debating on Deleting the content under the Mod folder, reloading the original backup, then writing the 1.9.19 files over that.   I'm wondering if my attempt to go to 2.0 uploaded some files that never got replaced when I restored.

In reply to Joe Mars

Re: Upgrade Issues - 1.9 > 2.0+

by Ken Task -
Picture of Particularly helpful Moodlers

When having to use ftp to upgrade a moodle the recommendation is ... *never* attempt an overright - ie, replacing files.   This leaves old code directories and files that, if found by Moodle, will confuse it.

The important file in the current moodle code directory is config.php ... make sure you archive that.

See:

https://docs.moodle.org/19/en/Upgrading

Yes, that's an old page ... but it's related to your current situation and first step in the 'march' ... upgrading a 1.9.? to the highest 1.9.19+.

'spirit of sharing', Ken


Average of ratings: Useful (1)
In reply to Joe Mars

Re: Upgrade Issues - 1.9 > 2.0+

by Emma Richardson -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers

Ken beat me to it - NO, do not overwrite!!  You run the risk of mixing old code with new.

Instead, double check the permissions and ownership on your moodle folder.  Make sure that any changes you make are made recursively.

If on linux:

chmod -R 755 moodle

chown -R www-data:www-data moodle - this is the owner on Debian installs, might be apache:web or something similar on Centos.

In reply to Joe Mars

Re: Upgrade Issues - 1.9 > 2.0+

by Debbie Kay -

Hi Joe

I recently created a test copy of my 1.9.4 moodle and upgraded to 3.0.5 without (apparently!) many issues.

An outline of what I did is below:

For making the copy installation:

I made the copy by backing up the DB, and compressing and downloading the moodle files and moodledata folders first.

Then created a new DB and imported my saved copy into it.

Then unzipped the original moodledata copy folder to a new, empty folder - moodledata2 (then moved all files so directly in the moodledata2 folder.)

Then repeated the above with the moodle folder files - moodlecopy.

Then I changed config.php in the moodlecopy folder to reflect the new db name, URL and moodledata2 locations/names/password as appropriate.

I now have a copy of my original to safely test the upgrade on!

For the upgrade:

From 1.9.4 to 1.9.19 - I changed the name of the original moodlecopy folder to moodlecopy-old

Created a new empty folder called moodlecopy and uploaded and extracted the 1.9.19 installation zip downloaded from Moodle site.

Then copied across the config.php file from the moodlecopy-old folder to the moodlecopy folder containing the new 1.9.19 files.

Then logged in as Admin and ran the upgrade.

I repeated this process all the way to 3.0.5 in the following versions:

1.9.4 > 1.9.19 > 2.2.11 >2.6.11 > 2.9.7 >3.0.5

It is important to clear your cache between each upgrade to avoid repeat login issues.

All appears to be working OK, except that image links have broken - but as I only have a few, it is easy enough to update the links to those.

I have to add though, I much prefer Moodle 1.9 to my experiences of Moodle 2 or 3 so far.

It is much simpler to use and add content imo and the interface is to me very cluttered in 2 and 3 e.g. in 1.9 links to resources are set just to open on click, whereas in 2 and 3 to now access the same resources takes 2 further clicks as moodle shows the information about the resource, how many times you have viewed it, what grade it is etc all before allowing you to actually view - far more complicated than I need and frustratingly repetitive and slow to be able to access the resource!

I am now looking for ways to get rid of these extra steps before looking to upgrade my live site - but I hope this helps you - good luck!



Average of ratings: Useful (1)
In reply to Debbie Kay

From 1 to 2.+ [pholosophical]

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
Hi

You said:
> I recently created a test copy of my 1.9.4 moodle and upgraded to 3.0.5 without (apparently!) many issues.
>
> An outline of what I did is below:
> ...

Reports on solved problems are always welcome! They are even more useful in the original thread, "After upgrade have to login again to see every resource" https://moodle.org/mod/forum/discuss.php?d=336700 in your case.

> I have to add though, I much prefer Moodle 1.9 to my experiences of Moodle 2 or 3 so far.
>
> It is much simpler to use and add content imo and the interface is to me very cluttered in 2 and 3 e.g. in 1.9 links to resources are set just to open on click, whereas in 2 and 3 to now access the same resources takes 2 further clicks as moodle shows the information about the resource, how many times you have viewed it, what grade it is etc all before allowing you to actually view - far more complicated than I need and frustratingly repetitive and slow to be able to access the resource!

There were many sentiments after the transition to version 2. That wasn't a discussion point for the Moodle HQ. The To put it diplomatically, the "old" version was better for the old-school, the new version for the new school. The success of Moodle, measured in number of users/installations, speaks for itself. I conclude that the masses are new school.
wink

Whatever, far too late to talk about it.
In reply to Visvanath Ratnaweera

Re: From 1 to 2.+ [pholosophical]

by Joe Mars -

Hi Everyone  - Just some Praises and Updates of where I am currently standing with the updating process. First some praises!

Hi Debbie,

I really appreciate your steps to your success! I am glad you have been able to successfully update your moodle, I am trying to do it in a similar method.  I just run into a few issues with the lack of knowledge and information of our whole setup with SiteGround.   I tried to create a new folder for testing only.  I ended up running into an issue that I couldn't even load the page format correctly or any background colors.  This was an exact copy of my live run with necessary changes made to the config.php.

Thank you Emma, Ken, & Visvanath,

For your continued support to myself and others posting in this thread.  I am sure at some point there is someone else out there with not the most knowledge on Moodle trying their best and running into similar issues.

UPDATE TIME:

So today I need to update an iMac when it gets in so I don't know how much Moodling I will do today.

To make Emma & Ken sad, I ended up updating by installing 1.9.19 over my previous version.   To be fair, I did clear out the folder, install the 1.9.19 files and adjust the config file to the correct settings.  This ended up giving me a few issues That I couldn't seem to get around.

So I actually restored the original files over but did not have it overwrite any of the 1.9.19 files.  This was so it only imported any files that didn't exist.  After that, I was able to pull up the admin page and successfully update to 1.9.19 without any further issues!

I'm sure it was not the most ideal way but it did bring success.  I'm sure this will not work going forward with 2.2+

Today I am going to back all the data again and start double checking the requirements for 2.2.11.   Provided nothing blows up on me today and the server upgrades run into no issues tomorrow morning, I should be able to start attempting to upgrade tomorrow.

In reply to Joe Mars

Re: From 1 to 2.+ [pholosophical]

by Joe Mars -

Okay, so going forward.

I have Backed all the Moodle files running on 1.9.19.

I have cleared it out, uploaded 2.2.11 and copied over the Config.php as well as the Uploaddata.


This is the Error I now receive when trying to upgrade.

Error reading from database


Boring and very short.  Any Ideas?

In reply to Joe Mars

Re: From 1 to 2.+ [pholosophical]

by Debbie Kay -

Hi Joe

Since my success, I also had another try fail.

If that happens, I just went back to the beginning and started again.

My experience (though limited) is that sometimes it works and sometimes you think you have done everything the same and it doesn't!

Sorry, not much help on this but you are not alone - keep trying smile

In reply to Debbie Kay

Re: From 1 to 2.+ [pholosophical]

by Joe Mars -

Hi Debbie,

Thank you for your words of hope.  I think with the upgrading process from such an old version, hope & luck is needed smile


Since that last post however,  I found that SiteGround has a 3rd party App (Softaculous) that helps you install other 3rd party Apps.   I have since just installed 3.1 and then the next day, 3.2 came out which forced me to test the update without risk of losing data.  We have now moved our user data over, and moved all the courses.  As our sessions are about to start, we wont implement it right away but will continue to configure and get ready to deploy in December while there is a break.


Thank you again to everyone's support!  I never would have gotten this far without any of your help. Moodle is a small but ferocious beast when it wants to be.