Tuesday, 18 February 2014

Moodle Upgrade - Command Line

Recently i found that when attempting to upgrade a large Moodle site using the conventional browser based method, the server had a nasty habit of timing out on me. It is also notoriously difficult to see what is going on during an upgrade, when all you get is the spinning wheel in a browser.

Personally i found upgrading using the command line, much easier and much more informative than using the WFE.





Resolution

I found that the best way to perform an upgrade was using simple PHP commands.


  1. Load an Administrative Command Prompt.
  2. type the command shown below.


  3. PHP.exe c:\inetpub\wwwroot\MOODLESITE\admin\cli\upgrade.php


  4. Next you will be asked if you want to proceed with the upgrade.

  5. 
    
    == Upgrading Moodle database from version 2.5.2 (Build: 20130909) (2013051402) t
    o 2.6.1+ (Build: 20140213) (2013111801.08) ==
    
    Your Moodle files have been changed, and you are about to automatically
    upgrade your server to this version:
    
    2.6.1+ (BUILD: 20140213) (2013111801.08)
    
    Once you do this you can not go back again. Please note that this process
    can take a long time.
    
    Are you sure you want to upgrade this server to this version?
    type y (means yes) or n (means no)
    :y
    
    
    

  6. Type "Y" for yes and hit Enter.
Now wait for it to complete, this can take a while.

No comments:

Post a Comment