Upgrade 3.2.2+ to 3.2.3+

Upgrade 3.2.2+ to 3.2.3+

by Sean W -
Number of replies: 16

Can someone point me to how to perform a minor upgrade?   3.2.2+ to 3.2.3+

I've read how to upgrade from a major version to another, but can't find how to do a minor upgrade. Common sense tells me it should be different - like overwriting a few files.

Replacing config.php? Why would that be overwritten by a minor upgrade? 

Does one completely reinstall (with the exception of building a db) even for minor updates?

Thanks!

Average of ratings: -
In reply to Sean W

Re: Upgrade 3.2.2+ to 3.2.3+

by Ken Task -
Picture of Particularly helpful Moodlers

If your 3.2.2+ was under git, then a minor update (not upgrade) can be performed in a matter of minutes.   And, one does not have to do all the moving of config.php out to safe location and then after ftp/however, move the config.php file back into new code.   Nor does one have to manually copy folders of addons.  

If your 3.2.2+ was not installed via git, may I ask ...

1. Is your moodle on linux or mac?

2. Do you have ssh (shell) access?

If so, one can do a 'side-load' of new code and get the 3.2.2+ into position to use git updates.

See this discussion/thread:

https://moodle.org/mod/forum/discuss.php?d=352043#p1420594

'spirit of sharing', Ken

Average of ratings: Useful (1)
In reply to Ken Task

Re: Upgrade 3.2.2+ to 3.2.3+

by Sean W -

Thanks for your reply.

Moodle is on a shared Linux host.

Performed a manual install by creating the db and unzipping the tar file (cpanel file manager), etc. 

Have shell access, but rarely use as spelling and syntax errors can make me a menace. That and past experience has proven shell access to be limited. For example, I installed drush for a drupal site, but couldn't get it work properly. Support let me know that unless I upgraded my server package, it never would.

In reply to Sean W

Re: Upgrade 3.2.2+ to 3.2.3+

by Ken Task -
Picture of Particularly helpful Moodlers

Sounds like you need to move to a VPS ... where you have what need ... drush, moooh, wp-cli, git, an open sourced cPanel called Webmin (there are others) ... all of it.  So many, however, seem stuck with WHM and cPanel ... and that would probably happen to you if you upgraded to a VPS ... providers just copy your 'jailed' home directory to the new VPS so one is still in /home/[loginname]/public_html apache jail.

One might have to weigh the cost of VPS ... and the hidden cost of how to use the VPS (uhhh do you actually pay yourself?) ... vs the shared hosting limited whatever. 

When the pain of staying the same is greater than the change, change will happen. ;)

I'd say you are approaching that threshold.

'spirit of sharing', Ken

In reply to Ken Task

Re: Upgrade 3.2.2+ to 3.2.3+

by Sean W -

VPS is not an option.


In reply to Sean W

Re: Upgrade 3.2.2+ to 3.2.3+

by Ken Task -
Picture of Particularly helpful Moodlers

Oh, but it is ... just not from your perspective at present.

'spirit of sharing', Ken


In reply to Sean W

Re: Upgrade 3.2.2+ to 3.2.3+

by Rick Jerz -
Picture of Particularly helpful Moodlers Picture of Testers

I have a video on my Moodle webpage that shows how I do an upgrade.  You might consider watching it for "tips."  It may or may not directly apply to your situation and needs.

In reply to Rick Jerz

Re: Upgrade 3.2.2+ to 3.2.3+

by chris baumisch -

Why is this so painful?
Wordpress is so straightforward in regards to upgrades

In reply to chris baumisch

Re: Upgrade 3.2.2+ to 3.2.3+

by Sean W -

Wordpress upgrades itself now. Have used for years. Rarely an issue. Updates generally painless. I may explore LMS solutions for Wordpress. 

In reply to chris baumisch

Re: Upgrade 3.2.2+ to 3.2.3+

by Ken Task -
Picture of Particularly helpful Moodlers

Pardon if some of this seems to be lecturing ... not meant to be ... but I do know many tend to forget/ignore the past ... and it has everything to do with this very topic.

What's the purpose of the software?

Moodle a learning management system .. which grew out of computer managed instruction, I remember those ... 'drill and kill' they came to be known to some.
Other acronyms to google: ILS, CBI, CAI, CAL.

WordPress is blogging software ... content management (am not downplaying WP, great stuff ... better than DiDa, Front Page, or plain old NotePad/BBEdit FTP 'publishing' to Web server.   I used to hold the title of a 'web master' at one time.  But still, not the same purpose as Moodle.

Why is it difficult to update or upgrade a Moodle?

It isn't.   If you use git.  Many of the flies and code that comes with
Moodle package (zip or tar.gz or git acquired) is for programmers/developers.

Now if you had a Mac or Linux, you could do this on your moodle code directory
to see what I mean.

find ./ -name moodle_readme.txt will find 6 such files in latest stable.
find ./ -name readme.txt will find 11 such files
find ./ -name license* will find 7 such files
find ./ -name \*.md

Same on wordpress files:
readme.txt ... 4 such files ... obviously no moodle_readme.txt files
license* 6 such files

The existence of such files is not poof of ease of update or upgrade, but
the contents of them might give you a clue/hint.  Take a gander at them sometime.

Is it fair to compare Moodle LMS software to a WordPress blog software?

Not really ... answer the following for yourself ...
What can Moodle do right out of the shrink wrap for online instruction?
with no addons/plugin, etc. to core code?
What can WordPress do right out of the shrink wrap for online instruction?
with no addons/plugin, etc. to core code?

Should Moodle be as easy to update and upgrade as WordPRess?

IMHO, yes ... and it could be made to be ... using the same tool programmers/developers use ... git.

It's becoming ... more an more ... the exception of all software for those use.
A better question might be to ask, what's the threshold for that to happen?

By all means explore using Joomla/WP/Drupal etc. as a learning management system ... better yet, see about integration where one could use the 'best' of those with the 'best' of Moodle ... or any such software ... like Google Classroom ... now open to all users, not just schools.

My 2 'sense' ... nope, spelled it correctly!

'spirit of sharing', Ken

In reply to Ken Task

Re: Upgrade 3.2.2+ to 3.2.3+

by Sean W -

Your first post was helpful. I wouldn't classify this response as lecturing; condescending is more accurate. 

Upgrading hosting for production isn't an option. I made that clear.  I need advice on updating using cpanel. If you have advice to offer that fits that model, I'm happy to hear it. 

 I may be a novice with Moodle, and I may not be able to afford better hosting, but I've been online and in development prior to the www. I know the difference between the two applications and run git on the development server. The production server is limited.

The comparison between Moodle and Wordpress is in the context of updating in a shared hosting environment with limited shell access, so it's a fair comparison in that light.





In reply to Sean W

Re: Upgrade 3.2.2+ to 3.2.3+

by Ken Task -
Picture of Particularly helpful Moodlers

If you took it that way ... sad

Your initial posting didn't make mention of shared hosting at all ... soooooo ...

Nope ... really disagree about 'fair comparisons' context.   cPanel doesn't make a version of their software for VPS's where it acts as root for server.  It's cPanel that puts customer in a user 'jail'.  And it's really not up to Moodle but your provider to make it easier for customers using their shared services.  Talk to your service provider.

Since you've been online prior to www, wonder if you've ever considered pushing the limits of shared hosting that you have?  Can you make anything executable in your 'jailed space'?   Rick's solution requires at least .sh ability.  

Proud to say at one time I 'earned' the 'honor' of being among the top 50 'abusers' on Unix systems during 'world wide wait' on a state wide dial up network called TENET ... which leads to this ...

Probably can't compile any software, but wonder if one could upload git to user space and be able to use it anyway?  Insallation of git via package manager on some Linux systems didn't actually have dependencies that were required to run it - from what I could tell.   Surely even shared hosting Linux systems allow customers to use bash.

Best of luck to ya.

'spirit of sharing', Ken


In reply to Ken Task

Re: Upgrade 3.2.2+ to 3.2.3+

by Rick Jerz -
Picture of Particularly helpful Moodlers Picture of Testers

Yep, my preferred method involves ssh.  But I thought about this a little, and maybe one could use cPanel's FileManager utility to do the upgrade.

I think the process would be something like this.

1) Download Moodle and Moodle plugins to your local computer.

2) Using FileManager (in cPanel), move these up to a temporary location on your server.

3) Unpack the tar files.

4) In the unpacked moodle, copy current config.php file to the temporary moodle.

5) Install all of the extra plugins.

6) Rename current moodle (in public_html, htdocs, www, where ever) to .../moodleX.

7) Move the temporary moodle into its production location.

So I think it could be done, it just requires a lot more work and a need to be careful.

Oh, I forgot, step "0" is always backup everything (moodle, moodledata, and mySQL database.)  Also, if moodledata is currently in the (wrong) position within .../public/moodle, this would need to be copied to the the new temporary moodle before moving it into its production location.

In reply to Rick Jerz

Re: Upgrade 3.2.2+ to 3.2.3+

by Sean W -

Thanks - I'll have a look. I suspect I'll need to do a full reinstall for minor updates. 

Looks like I need to:

1. Install new plugin versions (if any)

2. Turn on maintenance mode.

3. Move installation

4. Extract new version

5. Copy config back to folder

6. Turn off maintenance mode

7. Run update from server admin notifications page

Hope that's correct.

In reply to Sean W

Re: Upgrade 3.2.2+ to 3.2.3+

by Rick Jerz -
Picture of Particularly helpful Moodlers Picture of Testers

That's not exactly how I would do it, but there are many ways to upgrade your moodle.  I think that your 4 should be ahead of your 3. 

Have you tried this on an experimental version of moodle?

In reply to Sean W

Re: Upgrade 3.2.2+ to 3.2.3+

by Just H -

You've missed out a step - move any non-core plugins you use back (yes, a pain in the proverbial!).

Your 3 and 4 are in the right order.

In reply to Just H

Re: Upgrade 3.2.2+ to 3.2.3+

by Sean W -

Thanks everyone for the additional comments.

The 3.3 update was released while I was looking at the 3.2.2+ update, so I installed that version.

Please see summary at moodle before attempting. 

My upgrade process reported that I met minimal requirements, but I found PHP 5.6 abhorrently slow. PHP 7.0 resolved this issue.

Process takes awhile, but here's what was successful using cpanel.

1. Full backup and database dump 

2.  Upload tar file to site root (or whichever folder /moodle directory resides)

3. Enable Maintenance Mode (Administration > Site administration > Server > Maintenance mode) 

4.  Rename current moodle directory 

5. Expand tar file (cpanel file manager)

6.  Copy config.php into new /moodle directory 

7.  If you have downloaded and installed non-core plugins, copy those to correct folder(s) 

8.  If you have downloaded and installed non-core themes, copy those to correct folder(s) as well.

9. Disable Maintenance Mode 

10. Run Moodle update  (Administration > Site administration > Notifications)

The update is thorough - it will advise if plugins are missing. It will not advise if theme files are missing until all missing plugins are found. 

12. I reenabled Maintenance Mode at this point to review/test the site.

11. After update, I purged all caches. (Site Administration > Development > Purge all caches)

12. If your theme appears to be having issues, resave the theme settings (Administration > Site administration > Appearance > Themes > Theme settings). and navigate to the theme selector page (Administration > Site administration > Appearance > Themes > Theme selector). Theme should reload. 

13. Disable Maintenance Mode