Follow below instructions if you ware upgrading your Moodle site
- Copy/Duplicate "public_html" folder as a backup
- Delete all files and folder under "public_html"
- Download the latest version of Moolde from the official site and upload the zip file at "public_html"
- Extract the zip file
- Copy config.php, theme folder and plugins from your backup (duplicate site)
- Now, go to your domain/my (www.xxxxx.com/my/) and follow the instruction, it will ask you to update your files, plugins and database. Just click next...
- Done!!
This is the official instruction...
- Move your old Moodle software program files to another location. Do NOT copy new files over the old files.
- Unzip or unpack the upgrade file so that all the new Moodle software program files are in the location the old files used to be in on the server. Moodle will adjust SQL and moodledata if it needs to in the upgrade.
- Copy your old config.php file back to the new Moodle directory.
- As mentioned above, if you had installed any plugins on your site you should add them to the new code tree (Moodle directory structure) now. It is important to check that you get the correct version for your new version of Moodle. Be particularly careful that you do not overwrite any code in the new version of Moodle and that you place the plugin folders in the correct directory (the same directory that they are in in the current installation.)
- Your moodledata folder should be located separately to your Moodle code folder and, as such, should not need anything done to it. Moodle 3.0 will throw a warning if it is located in a web accessible folder and the moodledata should never be located in the Moodle code folder. If you are moving your installation to a new server or new location on your server, then you will need to follow the Migration documents.
Link: https://docs.moodle.org/39/en/Upgrading