Installing and Upgrading Moodle on VPS using cPanel Videos

Installing and Upgrading Moodle on VPS using cPanel Videos

by Rick Jerz -
Number of replies: 56
Picture of Particularly helpful Moodlers Picture of Testers

I decided to create a new post for this instead of piggybacking off of other posts.

About a month ago, I created a video showing how I would install Moodle on my VPS if I were only to use cPanel, given that your VPS already meets Moodle's minimum requirements.  I actually do not use cPanel, I use FTP and SSH.  I made this video surrounding some discussion that included Ken's help.  Of course, not all VPSs are the same, so what I show in these videos may not work on other VPSs.

Ken asked if I could show how to upgrade a Moodle using only cPanel.  I completed this video yesterday.

I am posting both videos in this topic.  I am always seeking feedback, and since I produce my own videos, my thoughts are to try to keep these videos updated, based upon your suggestions.  Both videos are each under 10 minutes.  Some folks already made some suggestions to my first video, which I have already incorporated.

This post can be referenced, as needed.  I have noticed a fair number of new folks using various one-step methods, and having problems with the install and upgrading.  Perhaps these videos will encourage some folks to avoid the one-step methods.  These videos also have "chapters" to help folks refer to a specific point within the video.

I am also hoping that these videos support some of the generic steps in managing your Moodle, and that people will find the more efficient ways of doing some of these steps.  (These videos, for example, do not touch upon the GIT method.)

What other videos would be most helpful?  For example:

  • How to prepare your VPS for Moodle
  • How to migrate your Moodle
  • How to install Opcache
  • How to begin tuning your database
  • Some initial Moodle setup tasks

So, here they are.

 

 
 



Average of ratings: Useful (11)
In reply to Rick Jerz

Re: Installing and Upgrading Moodle on VPS using cPanel Videos

by John Carey -
Hi Rick

Thanks for the videos - I've just used the Upgrade one and it's great smile

I can, and will, recommend it to anyone using cPanel - just do what Rick says and all will be well smile)

Very Best
John
In reply to John Carey

Re: Installing and Upgrading Moodle on VPS using cPanel Videos

by Rick Jerz -
Picture of Particularly helpful Moodlers Picture of Testers
Great! I always hope that I can help. (However, realistically, there are many kinds of servers and hosting companies so I am not sure if my video covers all situations. Oh well.)

Also, I plan to produce another video someday titled something like "When you are ready to learn more beyond cPanel" or something like that.
Average of ratings: Useful (1)
In reply to Rick Jerz

Re: Installing and Upgrading Moodle on VPS using cPanel Videos

by John Carey -

I'd be very interested in that smile

In reply to Rick Jerz

Re: Installing and Upgrading Moodle on VPS using cPanel Videos

by Henry Kurwahn -

Rick

Thank you very much, I follow your video and great!!! we have Moodle now. 

* I Used FTP to upload the Model...tar because the CPanel could not upload 

In reply to Henry Kurwahn

Re: Installing and Upgrading Moodle on VPS using cPanel Videos

by Rick Jerz -
Picture of Particularly helpful Moodlers Picture of Testers
Cool, Henry! Yes, when I do this I use FTP too.
In reply to Rick Jerz

Re: Installing and Upgrading Moodle on VPS using cPanel Videos

by IPA Egypt -

Hi Rick

Thanks for the videos - you helped me.

I have a Moodle on Shared Hosting. But I need to change the host.

Do you recommend VPS or Cloud Hosting? and best provider?

Best regard

merth

In reply to IPA Egypt

Re: Installing and Upgrading Moodle on VPS using cPanel Videos

by Rick Jerz -
Picture of Particularly helpful Moodlers Picture of Testers
I am not sure. In general, I would say a VPS but only because that is what I am familiar with right now. Yes, I have seen these "Cloud Hosting" plans being offered by various hosting companies, but I don't know what they are and whether one can do a Moodle install on them. So someone else might need to answer your question.

Also, I am not recommending one hosting company over another. This is your choice. All that I am able to say is that I have been using GoDaddy for many years, and they seem to work fine for what I need. But there are many other hosting companies. I am not affiliated with any hosting company, nor do I own stock in any of them.
Average of ratings: Useful (2)
In reply to Rick Jerz

Re: Installing and Upgrading Moodle on VPS using cPanel Videos

by Eno Otuokon -
Hello Rick,

Thanks for the video it was very helpful, however, I am wondering the best way to create a staging or sandbox environment for my production site considering if I backup the production site and create a sandbox from it, won't they both be pointing to the same database and won't that create a problem for my production site. I await your response on this.

Thank you.
In reply to Eno Otuokon

Re: Installing and Upgrading Moodle on VPS using cPanel Videos

by Rick Jerz -
Picture of Particularly helpful Moodlers Picture of Testers
For a "sandbox" moodle, I gave this presentation at a MoodleMoot a few years ago.


Yes, I somewhat regularly move my production Moodle to my Sandbox.  I do this by making copies of my production Moodle database (SQL) and moodledata folders.  Then I manually install these (delete old, install new) into my sandbox.  Typically, your sandbox Moodle will point to your sandbox's database, not your production Moodle database.  The sandbox Moodle is completely separate from your production (unless you know how to connect the two, which I do not know how to do.  Yep, perhaps rsync, but I don't do this.)
In reply to Rick Jerz

Re: Installing and Upgrading Moodle on VPS using cPanel Videos

by Eno Otuokon -
Hello Rick,
Thanks for the feedback, this would mean I can create a sandbox on my VPS with an alternate domain name (example: mymoodlesandbox.com) and run all my update test there without interfering with the live Moodle install. I await your feedback on this scenario.

Thank you.
Eno Otuokon.
In reply to Eno Otuokon

Re: Installing and Upgrading Moodle on VPS using cPanel Videos

by Rick Jerz -
Picture of Particularly helpful Moodlers Picture of Testers
Sure, your sandbox can be on your VPS almost identically to how it can be on your local computer. A general recommendation is to use a consistent naming pattern, like what you suggest. You could even install a second moodle in its own folder, such as moodle_exp, make a second database called moodle_exp, and a second moodledata folder, called moodledata_exp. Of course, you can pick whatever names you want. I am just giving you an example. Some of this depends upon how your production moodle is installed (is it in its own folder?) When I do this, my main moodle is in https://mydomainname/moodle, then my experimental moodle is in https://mydomainname/moodle_exp. I wouldn't suggest putting your experimental moodle in your other moodle's folder, or things could get messy.  When I do this, no, I do not need a new domain name.

Others here in Moodle.org might be able to provide some other alternatives.
In reply to Eno Otuokon

Re: Installing and Upgrading Moodle on VPS using cPanel Videos

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
You are right. Two Moodle instances can not point to the same database. That will destroy both.

That said, there are special provisions like the two sites using different database prefixes. But that is not worth the trouble.
In reply to Visvanath Ratnaweera

Re: Installing and Upgrading Moodle on VPS using cPanel Videos

by Eno Otuokon -

Hello Visvanath,

Thanks for the feedback, I guessed as much it may be an issue, hence, having the sandbox run on a different domain to avoid the complexity. Thank you. 

Eno Otuokon 

In reply to Rick Jerz

Re: Installing and Upgrading Moodle on VPS using cPanel Videos

by Dan O'Reilly -
Hi Rick,
Thanks for the detailed video instructions on upgrading a Moodle install. I upgraded (on February 5, 2021) Moodle 3.10.1 to a newer build. I am working on a shared host service; nevertheless, your instructions for a VPS upgrade work the same.
Dan O'Reilly
In reply to Dan O'Reilly

Re: Installing and Upgrading Moodle on VPS using cPanel Videos

by Rick Jerz -
Picture of Particularly helpful Moodlers Picture of Testers
Out of curiosity, Dan, are you able to mention where you host your "shared hosting" Moodle?
In reply to Rick Jerz

Re: Installing and Upgrading Moodle on VPS using cPanel Videos

by Dan O'Reilly -
Hi Rick,
I am setting up a non-production Moodle site on NoSupportLinuxHosting.com. From what I can determine, NoSupportLinuxHosting.com would not be a good host for a production site of Moodle; nonetheless, one can experiment on the service cheaply. I plan to eventually move my site to a production server. So, currently, I am building the Moodle site on a lap top; I transfer the results to NoHost to test out (with no load). And, when I have finished the Moodle build, I will search out a production server to deliver the course. I still have not decided upon the final host service to use.
In reply to Rick Jerz

Re: Installing and Upgrading Moodle on VPS using cPanel Videos

by Marie Waterhouse -
The best 'Non-update' i've ever done
Rick - this is incredible support. Thank you. Upgrading MOODLE has been a constant disaster for me. Following your instructions I have got further with updating than I ever have done before. The site didn't crash which is a major advance for me.

However, the site didn't actually update to the new version and I do not understand why.
I am running Moodle 3.8+ (Build: 20191220) and tried to update it to Moodle 3.9.4+ (Build: 20210211) Version 2020061504.04

Following your upgrade (second) video there were two things which differed on my set up.
1) In my production moodle (under public_html) I only had one empty moodle folder called 'moodle'
2) My config.php file was not in this 'moodle' folder it was just listed under public_html

So I downloaded Moodle 3.8+ (Build: 20191220) again and renamed the moodle file 'moodle38plus' and added it to my public_html I then added the config.php into this folder. I am now inline with your set up and instructions.

Then I created my moodletmp folder. Downloaded the next version Moodle 3.9.4+ (Build: 20210211) Version 2020061504.04 renamed the 'moodle' folder moodle38plus and copied the config.php file (from public_html) into the moodletmp/moodle38plus

I followed all the rest of the instructions. Went back to my site /admin and was asked to confirm the database settings (name, username. pword) which I got from the config.php file
But no updates were triggered and the site still shows the old version Moodle 3.8+ (Build: 20191220)

Your thoughts or advice would be very much appreciated if there is anything blindingly obvious. Like I say - even though the site didn't upgrade this is still the most progress I have ever made due to your excellent video.
Thank you
Marie
In reply to Marie Waterhouse

Re: Installing and Upgrading Moodle on VPS using cPanel Videos

by Rick Jerz -
Picture of Particularly helpful Moodlers Picture of Testers
Thanks for your comments, Marie. Nope, I can't make a video that covers every way that a Moodle might be installed. So sometimes you have to step back, look at the big picture of what I am doing, and modify my method for your own Moodle.

#1. Typically, the "moodle" folder is not empty. You need to find the location of your production Moodle. Some Moodles are installed in other folders, and some Moodle's are installed right in "public_html" meaning no individual folder. When you go into your current working production Moodle, what do you see in the URL? I see "www.(my domain).com/moodle/." This tells me that my Moodle is in its own folder. What does yours say?

#2. Since your config.php file is right in "public_html" my guess is that that is where your Moodle is installed. In public_html, do you see a bunch of folders, like admin, blocks, enrollment, install, themes, etc. If so, your moodle is not in its own folder.

If you go to cPanel, Filemanger, and then public_html, take a screenshot and post it here.

When Moodle is installed in public_html, and not in its own folder in public_html, things can get messy. For example, someone might also have Wordpress in public_html, and other stuff. This is why I prefer putting Moodle into its own folder. Then, all moodle stuff is in one place, and I can keep my head screwed on correctly when I update.
Average of ratings: Useful (1)
In reply to Rick Jerz

Re: Installing and Upgrading Moodle on VPS using cPanel Videos

by Marie Waterhouse -
Hello Rick,
Thank you for your reply. Your questions made us look again at the set up. You were correct - the Moodle is installed in public_html, and not in its own folder in public_html.
We moved the 'old' version into a 'folder' and moved the 'new' version into public_html. The upgrade went ahead as expected until we got to the final save changes screen upon which we get a 403 error. We are still very happy to have got this far and have learnt so much in the process.! Any thoughts on that pesky 403 error?
Best wishes
Marie
Attachment 403.PNG
Attachment savechanges.PNG
In reply to Marie Waterhouse

Re: Installing and Upgrading Moodle on VPS using cPanel Videos

by Leon Stringer -
Picture of Core developers Picture of Particularly helpful Moodlers

While Rick's sleeping here are some things to check:

  1. In the old Moodle 3.8 folder is there an admin subfolder?
  2. Have you still got the old config.php, in the old Moodle 3.8 folder perhaps? Can you tell us what it says for $CFG->admin?
  3. Can you see a file call .htaccess either in public_html or public_html/admin?
  4. Do you have access to the web server logs? If you can see the 403 responses can you share these with us? If there are separate error logs available, do these show anything at the same time that the 403 responses occur?
Average of ratings: Useful (1)
In reply to Leon Stringer

Re: Installing and Upgrading Moodle on VPS using cPanel Videos

by Marie Waterhouse -
Hello Leon, thank you for your help.
#1 Yes - the old moodle3.8 has an admin subfolder and the new (failed) version does also
#2 The old config.php says $CFG->admin = 'admin'; and the new config file says $CFG->admin = 'admin'; I did notice the new config file is much smaller than the old with some elements missing - I noticed the '$CFG->passwordsaltmain = ...' is missing on the New Config file. I did make a copy of the old config file. I could rename the current one config.phpx and copy the old config.php into public_html .
#3 I had to search files for this. I have .htaccess at top level (/home/homeeduc) I have htaccess in my moodle data folder and in various places where I have made old copies and back ups. The only instance of htaccess within public_html is within a folder we created while we were moving things around. Shall I move this htaccess out of the subfolder public_html/folder and into public_html ?
#4 I paste server error logs below. At least I think these are the error logs - not confident I am looking at correct thing here.

Thank you so much for your help - really appreciated. Shall I add htaccess file and see if that solves problem? Then try copying saved config file into current (failed) version?
Best wishes
Marie
2021-02-19 09:58:43.909244 [INFO] [119275] [185.191.171.1:18624#APVH_homeeducated.org.uk] File not found [/home/homeeduc/public_html/404.shtml]
2021-02-19 09:58:43.909177 [INFO] [119275] [185.191.171.1:18624#APVH_homeeducated.org.uk] File not found [/home/homeeduc/public_html/robots.txt]
2021-02-19 09:40:38.480956 [INFO] [119275] [54.36.148.83:35250:HTTP2-1#APVH_homeeducated.org.uk:443] File not found [/home/homeeduc/public_html/404.shtml]
2021-02-19 09:40:38.480913 [INFO] [119275] [54.36.148.83:35250:HTTP2-1#APVH_homeeducated.org.uk:443] File not found [/home/homeeduc/public_html/robots.txt]
2021-02-19 09:27:58.227995 [INFO] [122736] [86.161.169.247:60800:HTTP2-37#APVH_homeeducated.org.uk:443] File not found [/home/homeeduc/public_html/403.shtml]
2021-02-19 08:57:33.873737 [INFO] [122736] [86.161.169.247:60473:HTTP2-19#APVH_homeeducated.org.uk:443] File not found [/home/homeeduc/public_html/403.shtml]
2021-02-19 08:53:46.303685 [INFO] [122736] [114.119.130.199:11138#APVH_homeeducated.org.uk] File not found [/home/homeeduc/public_html/404.shtml]
2021-02-19 08:53:46.303651 [INFO] [122736] [114.119.130.199:11138#APVH_homeeducated.org.uk] File not found [/home/homeeduc/public_html/robots.txt]
2021-02-19 08:53:23.853798 [INFO] [122736] [81.106.179.209:55576:HTTP2-19#APVH_homeeducated.org.uk:443] File not found [/home/homeeduc/public_html/404.shtml]
2021-02-19 08:53:23.853759 [INFO] [122736] [81.106.179.209:55576:HTTP2-19#APVH_homeeducated.org.uk:443] File not found [/home/homeeduc/public_html/admin_moodle]
2021-02-19 08:53:05.209639 [INFO] [122736] [81.106.179.209:55576:HTTP2-15#APVH_homeeducated.org.uk:443] File not found [/home/homeeduc/public_html/404.shtml]
2021-02-19 08:53:05.209599 [INFO] [122736] [81.106.179.209:55576:HTTP2-15#APVH_homeeducated.org.uk:443] File not found [/home/homeeduc/public_html/admin_moodle]
2021-02-19 08:44:33.398526 [INFO] [122736] [86.161.169.247:60316:HTTP2-119#APVH_homeeducated.org.uk:443] File not found [/home/homeeduc/public_html/403.shtml]
2021-02-19 08:07:38.831375 [INFO] [122736] [185.191.171.40:5866#APVH_homeeducated.org.uk] File not found [/home/homeeduc/public_html/404.shtml]
2021-02-19 08:07:38.831332 [INFO] [122736] [185.191.171.40:5866#APVH_homeeducated.org.uk] File not found [/home/homeeduc/public_html/robots.txt]
2021-02-19 07:10:58.374579 [INFO] [122736] [5.255.231.187:55392#APVH_homeeducated.org.uk:443] File not found [/home/homeeduc/public_html/404.shtml]
2021-02-19 07:10:58.374538 [INFO] [122736] [5.255.231.187:55392#APVH_homeeducated.org.uk:443] File not found [/home/homeeduc/public_html/robots.txt]
2021-02-19 06:42:54.193565 [INFO] [122736] [114.119.142.140:10870#APVH_homeeducated.org.uk] File not found [/home/homeeduc/public_html/404.shtml]
2021-02-19 06:42:54.193528 [INFO] [122736] [114.119.142.140:10870#APVH_homeeducated.org.uk] File not found [/home/homeeduc/public_html/robots.txt]
2021-02-19 06:35:34.937304 [INFO] [122736] [40.77.167.66:64512#APVH_homeeducated.org.uk] File not found [/home/homeeduc/public_html/404.shtml]
2021-02-19 06:35:34.937267 [INFO] [122736] [40.77.167.66:64512#APVH_homeeducated.org.uk] File not found [/home/homeeduc/public_html/robots.txt]
2021-02-19 06:22:02.671205 [INFO] [3053] [54.178.182.46:26853#APVH_homeeducated.org.uk] File not found [/home/homeeduc/public_html/404.shtml]
2021-02-19 06:22:02.671184 [INFO] [3053] [54.178.182.46:26853#APVH_homeeducated.org.uk] File not found [/home/homeeduc/public_html/wp/wp-login.php]
2021-02-19 06:22:02.179892 [INFO] [3053] [54.178.182.46:58741#APVH_homeeducated.org.uk] File not found [/home/homeeduc/public_html/404.shtml]
2021-02-19 06:22:02.179850 [INFO] [3053] [54.178.182.46:58741#APVH_homeeducated.org.uk] File not found [/home/homeeduc/public_html/blog/wp-login.php]
2021-02-19 06:22:01.695809 [INFO] [3053] [54.178.182.46:17342#APVH_homeeducated.org.uk] File not found [/home/homeeduc/public_html/404.shtml]
2021-02-19 06:22:01.695779 [INFO] [3053] [54.178.182.46:17342#APVH_homeeducated.org.uk] File not found [/home/homeeduc/public_html/wordpress/wp-login.php]
2021-02-19 06:22:00.471075 [INFO] [3053] [54.178.182.46:42251#APVH_homeeducated.org.uk] File not found [/home/homeeduc/public_html/404.shtml]
2021-02-19 06:22:00.471039 [INFO] [3053] [54.178.182.46:42251#APVH_homeeducated.org.uk] File not found [/home/homeeduc/public_html/wp-login.php]
2021-02-19 06:18:10.728379 [INFO] [3053] [185.191.171.2:22466#APVH_homeeducated.org.uk:443] File not found [/home/homeeduc/public_html/404.shtml]
2021-02-19 06:18:10.728353 [INFO] [3053] [185.191.171.2:22466#APVH_homeeducated.org.uk:443] File not found [/home/homeeduc/public_html/robots.txt]
2021-02-19 05:26:05.061014 [INFO] [57543] [95.217.251.235:63738#APVH_homeeducated.org.uk:443] File not found [/home/homeeduc/public_html/403.shtml]
2021-02-19 05:03:04.516553 [INFO] [57543] [185.191.171.2:59780#APVH_homeeducated.org.uk:443] File not found [/home/homeeduc/public_html/404.shtml]
2021-02-19 05:03:04.516504 [INFO] [57543] [185.191.171.2:59780#APVH_homeeducated.org.uk:443] File not found [/home/homeeduc/public_html/robots.txt]
2021-02-19 04:57:54.370528 [INFO] [57543] [216.18.204.204:23626#APVH_homeeducated.org.uk:443] File not found [/home/homeeduc/public_html/404.shtml]
2021-02-19 04:57:54.370450 [INFO] [57543] [216.18.204.204:23626#APVH_homeeducated.org.uk:443] File not found [/home/homeeduc/public_html/robots.txt]
2021-02-19 04:55:10.997821 [INFO] [57543] [216.18.204.204:63152#APVH_homeeducated.org.uk] File not found [/home/homeeduc/public_html/404.shtml]
2021-02-19 04:55:10.997767 [INFO] [57543] [216.18.204.204:63152#APVH_homeeducated.org.uk] File not found [/home/homeeduc/public_html/robots.txt]
2021-02-19 04:26:43.859796 [INFO] [40759] [5.255.231.9:34148#APVH_homeeducated.org.uk:443] File not found [/home/homeeduc/public_html/404.shtml]
2021-02-19 04:26:43.859768 [INFO] [40759] [5.255.231.9:34148#APVH_homeeducated.org.uk:443] File not found [/home/homeeduc/public_html/robots.txt]
2021-02-19 04:05:05.047827 [INFO] [95642] [34.74.20.92:52890#APVH_homeeducated.org.uk] File not found [/home/homeeduc/public_html/404.shtml]
2021-02-19 04:05:05.047775 [INFO] [95642] [34.74.20.92:52890#APVH_homeeducated.org.uk] File not found [/home/homeeduc/public_html/robots.txt]
2021-02-19 03:56:45.961406 [INFO] [93238] [34.74.20.92:55402#APVH_homeeducated.org.uk:443] File not found [/home/homeeduc/public_html/404.shtml]
2021-02-19 03:56:45.961362 [INFO] [93238] [34.74.20.92:55402#APVH_homeeducated.org.uk:443] File not found [/home/homeeduc/public_html/robots.txt]
2021-02-19 03:56:45.263349 [INFO] [93238] [34.74.20.92:54780#APVH_homeeducated.org.uk] File not found [/home/homeeduc/public_html/404.shtml]
2021-02-19 03:56:45.263300 [INFO] [93238] [34.74.20.92:54780#APVH_homeeducated.org.uk] File not found [/home/homeeduc/public_html/robots.txt]
In reply to Leon Stringer

Re: Installing and Upgrading Moodle on VPS using cPanel Videos

by Marie Waterhouse -
Leon - It is now working!
I also raised a helpdesk ticket with my hosting provider and asked them to check for any server side errors. They came back with this 'There was a ModSecurity rule that was being triggered and causing the 403 error. I have now whitelisted this for you.'
I have asked them for further details of this and will update the thread in case it helps anyone else.

Do you think I need to tidy anything up regarding the config file and the htacess file?
Many thanks - I am thrilled that we have finally managed to do an update.
In reply to Marie Waterhouse

Re: Installing and Upgrading Moodle on VPS using cPanel Videos

by Leon Stringer -
Picture of Core developers Picture of Particularly helpful Moodlers

That's great news.

.htaccess – don't worry about this. If one was present in public_html or public_html/admin it could have been causing these issues but now we know that's not the cause we can forget it. However the .htaccess in Moodledata is supposed to be there.

config.php – normally this would be copied from the old Moodle folder (step 3 in Rick's video) so would not get changed during the upgrade. But if everything seems to be working I'd be tempted to leave well alone but keep the old config.php just in case. Settings such as $CFG->passwordsaltmain are no longer used so are ignored anyway but if you were concerned you could share any entries that were different (remove passwords and other sensitive information before sharing these on the Internet).

In reply to Rick Jerz

Re: Installing and Upgrading Moodle on VPS using cPanel Videos

by Marie Waterhouse -
Thank you for the guidance above.
#1 - Sorry - I don't see any urls when I go into my current production in cpanel - I don't think I understand you correctly. Should I be looking in cpael for this info or on my website?
#2 -Yes - You are correct - I think this is where it is at. We swapped all the files out of public_html for the new version and managed to get through all the upgrade process except for the final point 'save changes' upon which we get a 403 error.
Thank you so much for your help. It feels like we are very close to solving the mystery of upgrades.
Best wishes
Marie
Attachment cpanel.PNG
In reply to Rick Jerz

Re: Installing and Upgrading Moodle on VPS using cPanel Videos

by Marie Waterhouse -
Hello Rick - The site is now working and updated. I can't thank you enough for your brilliant videos. I feel for the first time in years that we can actually moove forward with confidence and do upgrades.
With regards to the 403 error
I also raised a helpdesk ticket with my hosting provider and asked them to check for any server side errors. They came back with this 'There was a ModSecurity rule that was being triggered and causing the 403 error. I have now whitelisted this for you.'
I have asked them for further details of this and will update the thread in case it helps anyone else.

Thank you so much - I was at the point of ditching MOODLE because we could not do updates. Your help has been brilliant.
In reply to Marie Waterhouse

Re: Installing and Upgrading Moodle on VPS using cPanel Videos

by Rick Jerz -
Picture of Particularly helpful Moodlers Picture of Testers
A lot has happened since "I have been sleeping." Good things happen in dreams!!!  (Marie, update your profile so that we get a sense of where you are from, and your time zone.)

Okay, you got it figured out. You probably also see the differences between installing Moodle in the root public_html folder and in its own folder.

I would have guessed two things about that 403 error: 1) some files might not have had the correct permissions, or owners, and 2) maybe the file "upgradesettings.php" did not exist? That htaccess file can be a little tricky, especially that it is in public_html. I think that this file is often created by the server, and it is not normally in a "moodle" folder. This is an example for it being hard to say "delete everything in public_html." But when moodle is installed in its own directory, saying "delete the moodle folder" becomes easier.

Whenever you do these upgrades, and as a general suggestion, make sure to backup your moodle, moodledata, and moodle database before you do anything upgrading.

Another thing to consider is to have an experimental moodle, somewhere, to practice. For example, I have my regular production moodle in its own folder "../public_html/moodle" and then another moodle in another folder "../public_html/moodle_exp." To do this, you have to establish each moodle's own database and moodledata folders, so that your experimental moodle doesn't clobber your production moodle. On your server, where you have your moodle in public_html, this gets a little tricker.

Well, you have had success. Great!

Since this upgrade is fresh in your mind, start planning on upgrading again in a few weeks. Find a time when students are not active in your moodle, and then upgrade. The more that you practice, the easier it gets. (Again, always start with a backup.)

Thanks for helping, Leon. (I am now somewhat awake.)
Average of ratings: Useful (1)
In reply to Rick Jerz

Re: Installing and Upgrading Moodle on VPS using cPanel Videos

by Sreekanth Chakravarthy -
Hi Rick

First of all, thanks for the really detailed step-by-step video.

I started off well following this. I copied my extracted moodle310 folder to public_html folder.

But when I tried to access the website https://abitlikeme.co.in/moodle310 on my browser, I am getting an error that the page cannot be found.

The domain abitlikeme.co.in is my website registered with Godaddy, but not on Godaddy VPS. While creating the cPanel, I used the same website.

Can you please tell me where I am going wrong?

Thanks
Sreekanth
In reply to Sreekanth Chakravarthy

Re: Installing and Upgrading Moodle on VPS using cPanel Videos

by Rick Jerz -
Picture of Particularly helpful Moodlers Picture of Testers
Can you provide a screenshot of the files that are in moodle310? Perhaps you can go to cPanel, File Manager, for the screenshot.
In reply to Rick Jerz

Re: Installing and Upgrading Moodle on VPS using cPanel Videos

by Sreekanth Chakravarthy -
Hi Rick

There are a lot of files... Attaching 2 screenshots here, 2 more in another reply to the same post.

Sreekanth
Attachment abtlikeme_moodle310_1.png
Attachment abtlikeme_moodle310_2.png
In reply to Sreekanth Chakravarthy

Re: Installing and Upgrading Moodle on VPS using cPanel Videos

by Sreekanth Chakravarthy -

3rd and 4th screenshots

Attachment abtlikeme_moodle310_3.png
Attachment abtlikeme_moodle310_4.png
In reply to Sreekanth Chakravarthy

Re: Installing and Upgrading Moodle on VPS using cPanel Videos

by Rick Jerz -
Picture of Particularly helpful Moodlers Picture of Testers
It might be that your website, https://abitlikeme.co.in/, has problems. Try moving a simple web page into ../public_html, such as this one, and then try https://abitlikeme.co.in/.  This index.html file should display.
In reply to Rick Jerz

Re: Installing and Upgrading Moodle on VPS using cPanel Videos

by Sreekanth Chakravarthy -
Thanks Rick. It is not working. I will check on my website issue. Will share if I find any solution.
In reply to Sreekanth Chakravarthy

Re: Installing and Upgrading Moodle on VPS using cPanel Videos

by Rick Jerz -
Picture of Particularly helpful Moodlers Picture of Testers
A few things come to mind.
1) If this is a shared hosting platform, abort. If this is a VPS or better, continue.
2) I wasn't sure if you would understand the index.html file. By default, if you have a file named like this, it is displayed by default when someone tries your domain name, such as https://abitlikeme.co.in/. Other named files, such as aboutme.html need to be put into the URL, such as https://abitlikeme.co.in/aboutme.html.
In reply to Rick Jerz

Re: Installing and Upgrading Moodle on VPS using cPanel Videos

by Sreekanth Chakravarthy -
My main website is based on Wordpress. This is on cPanel. So I am guessing there is a clash between these two.

I am setting up another website using cPanel itself on GoDaddy in a couple of days. I will try installing Moodle using Godaddy VPS on that later.
In reply to Sreekanth Chakravarthy

Re: Installing and Upgrading Moodle on VPS using cPanel Videos

by Rick Jerz -
Picture of Particularly helpful Moodlers Picture of Testers
I am running my Moodle on a Godaddy VPS, so I can tell you it works great. Sure, a few little setup things need attention. I am using a GoDaddy VPS, 8GB RAM, 200GB HD, SSD, PHP v7.4.13, MariaDB 10.3.27. CENTOS 7.9, WHM 92.0.8. Apache 2.4.46.

Yes, you may have confused your WordPress site. I don't run WordPress, but my thoughts are that WordPress and Moodle can live together. There are probably many ways to do this. I would do it like this:

https://abitlikeme.co.in/wordpress
https://abitlikeme.co.in/moodle
In reply to Rick Jerz

Re: Installing and Upgrading Moodle on VPS using cPanel Videos

by Sreekanth Chakravarthy -
Yes, Rick. I read many posts where you mentioned that you have been using it for many years now. That gave me the confidence of trying it out. After I saw your videos, I thought it can't get easier than this.

I will work out the issues with my website.
In reply to Sreekanth Chakravarthy

Re: Installing and Upgrading Moodle on VPS using cPanel Videos

by Sreekanth Chakravarthy -
Hi Rick

Sorry for getting back to this so late. I was caught up with some other things.

But the good news is I was able to install the Moodle. I assigned it to a new domain, changed DNS settings, and followed the procedure in your video.

Here are the two links that helped me:
https://in.godaddy.com/help/create-an-account-in-webhost-manager-whm-8464
https://in.godaddy.com/help/set-up-nameserver-dns-with-webhost-manager-whm-8467

Again, thanks a lot for your amazingly detailed, step-by-step videos.

My Moodle site is: http://theschoolcampus.com/moodle310/

I haven't got anything on it right now though.

It looks a bit awkward to have the Moodle version or even "moodle" for that matter in the web address. I know it is coming from the public_html > moodle310 folder. But is there an easy way to change it to something like "http://theschoolcampus.com/learn/" without going through the installation all over again? (Sorry, if this question is not relevant to this post.)
In reply to Sreekanth Chakravarthy

Re: Installing and Upgrading Moodle on VPS using cPanel Videos

by Rick Jerz -
Picture of Particularly helpful Moodlers Picture of Testers
Great to hear about your success.

I don' exactly recall, but I think you can rename that "moodle310" to "learn" and then make changes in config.php. However, I would tend to do this during my initial install of Moodle just to make sure the internal database values are all correct. That folder name can be anything that you want it to be.

You can try this with a second installation of Moodle on your VPS (yes, you can have more than one.) Do the installation again using "learn" instead of "moodle310." To keep your sanity, when you create the database call it "learn," and when call the moodledata folder "learn." This way, you will remember which moodle is your "learn" and which moodle is your moodle310. Doing this will help you better understand how easy it is to create a Moodle, and it will help you practice.
In reply to Rick Jerz

Re: Installing and Upgrading Moodle on VPS using cPanel Videos

by Raphael Muonga -
Hi Rick,
Mine is a problem of "Exception - Class 'mod_assign_renderer' not found" in my Moodle 4.0.2 which I have just installed on offline Windows 10 desktop using BITNAMI Windows installer. This exception error is coming up on almost every field I need to update, be it Profile fields. What is the best solution to this problem. My Googling has not worked so far.
Regards
Raphael
In reply to Raphael Muonga

Re: Installing and Upgrading Moodle on VPS using cPanel Videos

by Leon Stringer -
Picture of Core developers Picture of Particularly helpful Moodlers

Raphael: Please don't "hijack" threads. It looks like your issue has nothing to do with the issues in this thread. Instead please open a new thread.

However, if you see this thread it looks like there may be a problem with Bitnami's build of Moodle 4.0. You may be able to resolve the problem by updating to the latest version of the Microsoft 365 Teams theme.

Average of ratings: Useful (2)
In reply to Rick Jerz

Re: Installing and Upgrading Moodle on VPS using cPanel Videos

by Soundarya Talawai -
Hi Rick,

I am planning to purchase the GoDaddy VPS hosting. We will be using moodle for a small academy of around 150-200 students. So could you please let me know if the plan with 4 GB RAM, 100 GB NVMe SSD Storage would be sufficient in this case?

Thanks & Regards,
Soundarya
In reply to Soundarya Talawai

Re: Installing and Upgrading Moodle on VPS using cPanel Videos

by Rick Jerz -
Picture of Particularly helpful Moodlers Picture of Testers
It is hard to say because I am unsure what you plan to do in your courses. For example, if you allow students to upload videos, you could run into problems. Or even upload a bunch of photos. And how do you plan to do backups? Also, will this server be doing anything else besides Moodle?

One idea would be to start with the 4GB RAM/100GB HD configuration and then continue monitoring your disk usage. A simple way to do this is to go into your terminal utility and issue a "df" command.

What I do is to buy a 3-year VPS plan with GoDaddy because I can secure the best rate. Then every three years, I buy a new 3-year plan. This is how I control the cost. If you work for a school (I am an individual), perhaps the school's budget could afford an 8GB/200GB HD configuration so that you can go longer without worry.

Consider my "advice" as simply a long-time user's advice, not "expert" advice.
In reply to Rick Jerz

Re: Installing and Upgrading Moodle on VPS using cPanel Videos

by Ken Task -
Picture of Particularly helpful Moodlers

Sorry for interjecting into 'Rick's Sub Forum' .... couldn't resist! smile

@Rick
'expert' ... someone who has guessed right 3 times in a row!

@Soundarya
Ricks advice about a little more than what you plan ... is good advice.
Always better to have more than enough, than not enough ... especially
considering that used moodles tend to grow ... not shrink!

And 2 cents more ... make sure your cPanel has 2 icons ... Terminal and Git.

Those might not seem important right now, but the surely might ... especially considering that version 4.0 and 4.1 are pretty much right out of the shrink wrap ... updates/fixes to code and security are coming frequently.

My 2 cents1

'SoS', Ken

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

Re: Installing and Upgrading Moodle on VPS using cPanel Videos

by Rick Jerz -
Picture of Particularly helpful Moodlers Picture of Testers
Good points, Ken.

I forgot that cPanel is an extra cost (oh, an extra feature) on GoDaddy's VPSs. I always include it. I believe there is only one version of cPanel that one can buy. About two years ago, cPanel included both Terminal (SSH Access) and GIT. Equally important, I tend to use the "EasyApache" cPanel utility a lot.

You might still want to first buy a 1 month product (making sure not to renew it), and then you will probably get discount emails from GoDaddy. After experimenting for a month you then might be ready to buy a longer-term plan.
Average of ratings: Useful (1)
In reply to Rick Jerz

Re: Installing and Upgrading Moodle on VPS using cPanel Videos

by Soundarya Talawai -
Hi Rick and Ken,

Thank you for your valuable comments I have purchased a GoDaddy VPS windows server with a plesk panel of 8 gb RAM and 200GB HD configurations as you had suggested.
I have installed moodle like you did in the video(https://moodle.org/mod/forum/discuss.php?d=401983#p1621924). But unfortunately I am unable to get into the admin page. I am getting a error "Coding error detected, it must be fixed by a programmer: Invalid property requested, or the property does not has a default value"

I had posted the same in the installation help forum to get any advice. I got an advise saying I should try installing using Command line. (https://moodle.org/mod/forum/discuss.php?d=441941&parent=1777616)But I am unable to login to the server via putty. I am getting an error saying Network error: "connection refused".
I also tried logging in to the remote desktop and tried to get into the command line via power shell. But there, none of the commands like git, sudo, mysqli etc are not recognized.
I would be very grateful if you would help me with this.

PS: I am very new to server administration and linux.

Thank you in advance

Best Regards,
Soundarya
In reply to Soundarya Talawai

Re: Installing and Upgrading Moodle on VPS using cPanel Videos

by Rick Jerz -
Picture of Particularly helpful Moodlers Picture of Testers
I have a few thoughts.

  • Have you enabled all the required php extensions?
  • Have you picked the correct database for your server? If so, which one?
  • You picked the "Plesk" panel instead of "cPanel." Plesk is a little different. Why did you pick Plesk?
Average of ratings: Useful (1)
In reply to Rick Jerz

Re: Installing and Upgrading Moodle on VPS using cPanel Videos

by Soundarya Talawai -
Hi Rick,

Yes, I understood that choosing the Plesk and windows operating system was a blunder. So I cancelled that plan and purchased the new plan with a linux OS and C-Panel. I have installed moodle and everything is working fine now.
Thank you for the video and the help.

Thanks & Regards,
Soundarya
Average of ratings: Useful (1)
In reply to Soundarya Talawai

Re: Installing and Upgrading Moodle on VPS using cPanel Videos

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

Good for you, you've corrected the "blunder" early. There is a reason why the LAMP stack begins with an 'L'.
In reply to Soundarya Talawai

Re: Installing and Upgrading Moodle on VPS using cPanel Videos

by Rick Jerz -
Picture of Particularly helpful Moodlers Picture of Testers
Wow, great work, Soundarya! Glad that you let us know.
In reply to Rick Jerz

This forum post has been removed

The content of this forum post has been removed and can no longer be accessed.
In reply to Deleted user

Re: Ang: Installing and Upgrading Moodle on VPS using cPanel Videos

by Rick Jerz -
Picture of Particularly helpful Moodlers Picture of Testers
I always get things ready in a temporary folder so that I do not accidentally clobber my production Moodle.

Moodle says: Requires: PHP 7.4, MariaDB 10.4 or MySQL 5.7 or Postgres 12 or MSSQL 2017 or Oracle 19c. MariaDB and MySQL somewhat track each other (you can explore their history). I think MariaDB could be recommended a little more than MySQL because MariaDB is open-source, or something like that. I have never used Postgres, so I am ignorant about it. Oracle might be a little less preferred, but it is good to know that it should work because Oracle is a big tech company. But Oracle also owns MySQL.

In my own case, on my VPS, I had options for either MySQL and MariaDB. I decided to go with MariaDB, for whatever reasons. I also run an experimental MAMP on my Mac, and in it, I use MySQL (this was the only choice). I have successfully moved my production moodle (MariaDB) down to MAMP (MySQL), and vice versa.

In my video, when I go too fast, slow your video player down. Most video players have speed controls.
In reply to Rick Jerz

Re: Installing and Upgrading Moodle on VPS using cPanel Videos

by Job Céspedes Ortiz -
Picture of Plugin developers

Hello:

A managed service for Moodle could be a superior option to a generic web hosting service or self-hosting. The distinction between a managed service and conventional hosting lies in the fact that the managed service takes care of all technical aspects of running Moodle, not just hosting it. With just a few clicks, it's possible to create an instance, and the service will take care of all the details related to installation and updates. Furthermore, it is designed to ensure that Moodle runs optimally. Two notable examples are MoodleCloud and Krestomatio, and I am part of the latter.