Upgrade from Moodle 2.5 to Moodle 2.6 in testing environment

Avatar
  • Answered
I have Moodle 2.5 installed on my server, with courses filled with videos, ltis, quizzes questionbanks and students progressing.

Seeing 2.6 is the most stable version right now with more features. I wanted to inquire whats the best way to move the whole website to a new location having all better functionalities.

Right now, because i purchased the SSL certificate after populating my course, my SSL is only on Login page, as for other the videos doesnt seem to work and other problem i face, so i want a clean move to a new location which will be secured over all.

My host: I am using inmotion VPS, but using it just like a shared hosting. So some guidance here would be great. I can use phpmyadmin to move the databse.

So hence, what kind of Database format should i make, and what to edit inside the db. As i am using Cpanel mostly, what would be the subsituite of the step below,

at: http://docs.moodle.org/26/en/Moodle_migration
(b) The second method is to backup the Moodle database first, then use the search and replace feature of your text editor (or use a unix tool like sed) to replace the old URL with the new one in the mysql backup file. Here is an example sed command:
#sed -e 's/oldserver.com/newserver.com/g' oldmysqldump.sql > newmysqldump.sql
NOTE: This second method will not replace text in blocks because they are stored base64 encoded in the database, so any links in blocks will not be fixed. Therefore you should consider using the replace tool after you migrate if you use this second method.
TIP: You may want to check the mysqldump file to see how the old server was referenced.
After changing the URL, restore the mysql database

Furthermore in the first step, does the replace.php completely move the website? As i was thinking to CLONE it. Which will not loose the data or progress of the student until i completely move to a new webpage.

Because i tried earlier the following steps:

I installed a fresh Moodle, and tried changing the database to the earlier database. But it gave me import error after i completely deleted the database of Moodle 2.6 and changed it to the one i had it on my old location, but didnt work well in that case.

Bottomline: Right now my portal is at http://web.com/ i want to clone it fully to https://web.com/vlp while both work fine. Until we check, test and migrate completely.
Avatar
JeffMa
From taking a look over Moodle's documentation on their upgrade process to 2.6, it does appear to be fairly straightforward. Here is what you would need to do:
  1. Make a backup of your database

  2. Create a new database that Moodle will use

  3. Download the newest version of Moodle from their website and uload the files contained in the zip file to the directory that you want Moodle to be located in.

  4. Edit your config.php in the new Moodle directory to reflect your new database name/user/password.

  5. Import your database that you previously dumped into the new database that you just created.

  6. Edit that new database via PHPMyAdmin to replace any instances of the old URL to the new URL. To do so, you can simply use the search function to search for any instances where the domain exists.

  7. Complete the upgrade process by going to Administration > Site administration > Notifications within your Moodle dashboard. Moodle should detect your new version and begin upgrading your database.

For additional reference, you may also view the Moodle 2.6 upgrade process within their official documentation.