In the past, experts like Howard (moderator of some forums), had suggested 'side loading' via git the same version as production code. The copy with preserve the hidden .git diretory and .gitornore files into production directory. Less moving of files/folders ... some of which are easy to miss
Backup code directory and DB before trying this! (you've been warned)
Are the plugins/addons compatible with the version to which you will upgrade? Check those.
Addons that were not installed by git won't be known to git ... git only knows about core code. Have you hacked any core code? Even just one line or a few characters? If so, git might recognize that.
What is current version of code? in /var/www/html/ (as per example below),
fgrep '$release' version.php will tell you.
Example:
Production site is in /var/www/html/ and is version 2.9.x
at /var/www/ use git commands to install the highest 2.9.x in a directory by another name at the same level as /var/www/html/
git clone git://git.moodle.org/moodle.git htmlgit (IF git does not work, stop ... check firewall ports, boundary firewall ports, etc.
That creates an htmlgit directory with git acquired dev code.
change into htmlgit and issue
git branch --track MOODLE_29_STABLE origin/MOODLE_29_STABLE
then
git checkout MOODLE_29_STABLE
To check what branch htmlgit is now pointed to: git branch -a
Should show a 29 stable as branch - highest 2.9.
Now copy the hidden .git directory and .gitignore to production directory.
in htmlgit
cp -rp .git /var/www/html/
cp -rp .gitinore /var/www/html/
cd /var/www/html/
Issue git branch -a
Does it show the highest 2.9?
The, just test git:
git pull
Any new code?
If git acquires new code ... check version.php file for what it acquired.
May as well finish the upgrade while at command line
php admin/cli/maintenance.php --enable
php admin/cli/upgrade.php --non-interactive
chown apache:apache * -R (for Ubuntu www-data:www-data ... or other ?)
Check version: fgrep '$release' version.php
Take site out of maintenance mode:
php admn/maintenance.php --disable
Site no accessible via web.
Go site with browser. Login as admin level.
Go to Notifications. Check for updates. Get plugin updates.
First time going through this is gonna take some time ... and you did take backups like suggested, right? ;)
Is above 100% to work ... well, what can I say ... is anything 100% sure today ... other than death and taxes? :|
'spirit of sharing', Ken