Update your Moodle with only 5 Commands

Поделиться
HTML-код
  • Опубликовано: 22 фев 2022
  • Every week, the latest Moodle code is pushed to the GIT repository. Using GIT, it's simple to update your Moodle to the latest code.
    The 5 Commands
    ① cd /path/to/your/moodle
    ② sudo -u www-data php admin/cli/maintenance.php --enable
    ③ git pull
    ④ sudo -u www-data php admin/cli/upgrade.php
    ⑤ sudo -u www-data php admin/cli/maintenance.php --disable
    Note that here I'm updating to the latest weekly build. But this will also work for minor releases (eg. 3.11.1 → 3.11.2).

Комментарии • 34

  • @johnleggett5054
    @johnleggett5054 4 месяца назад +1

    You're videos are fantastic! I am certainly learning a lot and gaining confidence in using a SSH connection. Many thanks for your sterling work!

    • @Wise-Cat
      @Wise-Cat  3 месяца назад

      Thanks again, SSH is scary at first, but you'll get there. Keep on going!

  • @sibamarcel9428
    @sibamarcel9428 2 года назад +1

    I am blessed with your video. Thanks a lot and waiting for the next step.

    • @Wise-Cat
      @Wise-Cat  2 года назад

      So nice of you to say. Thank you.

  • @haraldhochwald7456
    @haraldhochwald7456 20 дней назад +1

    Thank you for your excellent explanation, is it possible to pull a specific version of a Moodle update?

    • @Wise-Cat
      @Wise-Cat  20 дней назад +1

      Great question! Yes, it is possible. It's easy to checkout any of the branches (for example for 4.2.x with "git checkout MOODLE_402_STABLE"). That will get you the latest code on any given major version. For minor "point" releases it's a bit trickier and you'll need to search "git log" or "git tag" for the specific release you're after. Then to get for example v4.2.4, you would use "git checkout v4.2.4" (however this will not be on a branch and thus updating with "git pull" won't work until you return to a branch). Not a bad idea for a video actually, I'll add it to the to-do list. Cheers!

  • @kakhaberrevazishvili7736
    @kakhaberrevazishvili7736 2 года назад +1

    great!

  • @christinewolf961
    @christinewolf961 Год назад +1

    Hi. Thank you very much for your instructions. Could you please add some instructions for upgrading moodle on docker with docker-compose and nginx?

    • @Wise-Cat
      @Wise-Cat  Год назад

      I will try. Though I need to learn more about Docker myself first. It has been on my to-do list for quite some time though.

  • @school-of-enlightenment
    @school-of-enlightenment 2 года назад +1

    Wonderful tips. Could you please do the same for bitnami moodle upgrade on Azure or GCP

    • @Wise-Cat
      @Wise-Cat  2 года назад

      An interesting question, thank you. I tend to think that using git is the best way to install and upgrade Moodle. Last I checked, using bitnami to install Moodle will make it more difficult to update/upgrade later. This is mainly because of a need to reinstall any plugins you may have, as well as manually copying config.php if I recall correctly.
      So, I might review some of those "one-click" installers at some point (things do change, so it is about time I took another look), but generally my advice up to now has been to stay away from them and use git. After all the command "git pull" is difficult to beat for ease of updating.
      Cheers!

  • @kyleh7457
    @kyleh7457 2 года назад +1

    Hi, have 4 instances of Moodle running on Debian. I’ve taken this over from a customer site and have it on Esxi. I’m planning on duplicating the vm to have a copy site. And upgrade versions as some are running 3.4 and I’d like to bring them all up to date. Able to perhaps get in touch and assist with the copy site upgrade process. I’m in Australia also

    • @Wise-Cat
      @Wise-Cat  2 года назад

      Sure, we should probably do a Zoom call some time and then I can help troubleshoot if something goes awry. Definitely check the environment as 3.4 is almost certainly running on versions of PHP and SQL that won't work with 4.0. The Debian OS will probably need upgrading too.
      Send me an email and let's setup a time: adam@wisecat.net

  • @piratebasscaptain
    @piratebasscaptain 2 года назад +1

    Hi there, I have an error log when I try to upgrade, actually I have moved to new server and it does not work with the latest PHP version, so I needed to upgrade. any solution on this one ?

    • @Wise-Cat
      @Wise-Cat  2 года назад +1

      The solution is to upgrade PHP and you have a couple of options. The first is upgrading the actual server software. So if you're on say, Ubuntu 18.04 LTS, you can upgrade the OS to Ubuntu 22.04 LTS. PHP will also get upgraded in that process (caution: you may need to edit your virtualhost file to point to the new PHP manually).
      The other option is to update PHP only. I really don't recommend this as none of the other software on the OS will be updated with it. This usually involves adding a new software source (repository) and specifying the version of PHP you want. This route is for masochists or people who for some reason can't upgrade the OS only. If you can't upgrade the OS, fix that problem and get the ability to upgrade the OS. You'll thank me later.

  • @mohammedfahajan7408
    @mohammedfahajan7408 Год назад +1

    No upgrade needed for the installed version 3.11.8 (Build: 20220711) (2021051708). Thanks for coming anyway!

    • @Wise-Cat
      @Wise-Cat  Год назад

      I would guess that either you haven't run the "git pull" successfully or you were already fully up to date at that time. Maybe try again now.

  • @alejandrorubiofranco1532
    @alejandrorubiofranco1532 Год назад +1

    It is possible to update to a specific version?, for example 3.10 to 3.11, or it only update to the last version?

    • @Wise-Cat
      @Wise-Cat  Год назад

      It is possible to go to (almost) any version in Moodle's history. Check out this video where I start at 3.0 and upgrade through each version up to 3.11, setting a world record in the process LOL
      ruclips.net/video/ga-WOMW42JM/видео.html

  • @user-gf7ku3cy3n
    @user-gf7ku3cy3n Год назад +1

    what if before moodle was updated manually (by changing index.php file) and now when I try to git pull I have an error - not a git repository. What can I do in this situation? thank you beforehand

    • @Wise-Cat
      @Wise-Cat  Год назад

      Great question! I made a video about this exact topic a while back. ruclips.net/video/pzqY758UpVI/видео.html

  • @ceciliadeleon9
    @ceciliadeleon9 2 года назад +1

    I am still a newbie on Moodle, may I know how to back up my site? Like, can someone explain it to me thoroughly. Thanks in advance! Great video, btw!

    • @Wise-Cat
      @Wise-Cat  2 года назад +1

      Here is a playlist that's all about backing up your site. Hope it helps!
      ruclips.net/p/PLUocP1bKm-DuLrOg_HSljgQOpM6Y589Cv

  • @tilgel
    @tilgel 2 года назад

    Hello, "sudo command not found" What should I do?
    Thanks for the video btw.

    • @Wise-Cat
      @Wise-Cat  2 года назад

      You may not have sudo access on your server. If you are using a VPS, you should have sudo, but some shared hosting environments work differently. It depends on what kind of hosting you're using.

  • @bugamer3560
    @bugamer3560 2 года назад

    I have server on cloudways , how can I update my moodle?

    • @Wise-Cat
      @Wise-Cat  Год назад

      I don't know of cloudways as a service, but it seems they just manage servers on other platforms... Upgrading should be similar to as described in the video, though the path to wwwroot will likely be different.

  • @mutluhanyilmaz6809
    @mutluhanyilmaz6809 2 года назад +1

    Hello, how can I find MOODLE path?

    • @Wise-Cat
      @Wise-Cat  2 года назад +2

      The Moodle path will depend on where you (or the installer) installed it.
      The easiest way to find out would be to go to:
      Site admin > Server > PHP Info
      And look down near the bottom for a value with the label:
      $_SERVER['DOCUMENT_ROOT']
      The document root is the path to your Moodle code.

    • @mutluhanyilmaz6809
      @mutluhanyilmaz6809 2 года назад

      @@Wise-Cat Thanks a lot. :)

    • @mutluhanyilmaz6809
      @mutluhanyilmaz6809 2 года назад +1

      By the way, we are using MOODLE 3.9+ I want to update it following your instructions; a message raises: "It is not necessary any update". Furthermore, when I check its notification, I see a few new versions of MOODLE. It is weird. Is there any recommendation to solve this problem?

    • @Wise-Cat
      @Wise-Cat  2 года назад +2

      @@mutluhanyilmaz6809 Ahh, I see. You have updated your Moodle 3.9 to the latest version on that branch (which is great - bug fixes, security updates are important too), but you wish to move from 3.9 to 3.10 or 3.11, correct?
      In that case, I recommend you check a few of my other videos which will guide you in how to do these upgrades safely. First, check your server environment to make sure your server is ready for the future versions of Moodle (see this video ruclips.net/video/xd5Y40Nu5FA/видео.html ).
      Next, if your server is ready check this video on switching branches ( ruclips.net/video/wYg3_wxlN28/видео.html ). Be sure to take backups before trying anything though, and also make sure your 3rd party plugins are compatible with the newer versions of Moodle.
      Hope this helps, and happy upgrading!

    • @mutluhanyilmaz6809
      @mutluhanyilmaz6809 2 года назад +1

      @@Wise-Cat Thank you, I am grateful to you for your supports.. :)