Migrating from Moodle

Prev Next

You may find you need to move your Totara site from one server to another, for a variety of reasons including changes to infrastructure and hosting. Before migrating your Totara site, please ensure that the new server meets the minimum system requirements.

Recommended migration method

If you wish to migrate your site from one server to another, then we recommend you follow these steps:

  1. Go to Quick-access menu > Server > Maintenance mode. 
  2. Enable maintenance mode.
  3. Back up the Totara database on the old server.
  4. Restore the database backup to the new server.
  5. Copy data root from the old server to the new server.
  6. Copy the Totara code from the old server to the new server.
  7. Take the site out of maintenance mode.

This method should be used if you are migrating your site without changing the site's URL.

Considerations

There are several considerations to take into account when migrating a site from one server to another, these include whether you wish to upgrade at the same time, as well as some security issues. 

Upgrading

You may also wish to upgrade your site (either from Moodle or from an earlier version of Totara) during the migration process. Although this can be a useful way to save time it does pose some risks, mainly that if anything goes wrong during the joint upgrade and migration process it will be harder to know which process triggered the issue. If you carry out the processes separately it will be easier to isolate a problem and rectify it.

We strongly recommend that you complete the migration and any upgrades separately.

Note that there is no direct path to upgrade from Moodle to Totara 14 or above. Instead, you will need to upgrade from an applicable version of Moodle to Totara 13, and then you can upgrade from Totara 13 to a subsequent version of Totara. See our previous documentation on upgrading from Moodle to Totara 13 for more information. 

Security issues

As you are moving from one server to another it is important to consider the setup of this new server and any security changes that may have occurred during the transition. This is especially important in regards to things like DNS setup as well as internal and external access (the new server might not have the same firewalls setup). It is advised that you consider all of these things carefully to ensure you do not forget to enable something on the new server.

If you have Email-based self-registration enabled as an authentication method then you will need to enter new API keys to ensure that the ReCAPTCHA keys are generated from Google.

Upgrading from Moodle to Totara 13

Prerequisites

Before upgrading to Totara, please ensure that your server meets the minimum requirements described in the Server system requirements.

Note that there is no direct path to upgrade from Moodle to Totara 14 or above. Instead, you will need to upgrade from an applicable version of Moodle to Totara 13, and then you can upgrade from Totara 13 to a subsequent version of Totara.

Migrating from Moodle 3.4.9 to Totara 13

  1. Check the live logs to check if any users are currently using the site. The site will be offline while the upgrades are performed (Quick-access menu > Reports > Live Logs).
  2. Enable maintenance mode in Moodle (Quick-access menu > Server > Maintenance Mode).
  3. Back up the Moodle database.
  4. Back up the moodledata directory.
  5. Back up the Moodle source code directory.
  6. Replace or merge the Moodle code.
    • If your Moodle site is not customised you can replace your Moodle code folder with the new Totara code folder and copy your old config.php file to the new folder. Do not copy the new code on top of the existing code folder.
    • If you have customised Moodle you will need to merge your existing Moodle source code and new Totara code. This is best accomplished using a version control tool like GIT or SVN. You will need to:
      • Reuse the existing Moodle's config.php file
      • Ensure any themes are updated to work with Totara
      • Include any existing modules and filters remain in the code
      • Resolve any merge conflicts caused by existing local customisations
  7. Navigate to server/admin/index.php using a web browser and perform the install process.
  8. Click Yes on the Upgrade page.
  9. Confirm the server status checks.
  10. Confirm the plugin status checks.
  11. Proceed with the initial database upgrades.
  12. Edit the New Admin Settings page if required.
  13. Continue the database upgrades.
  14. Check for warnings or errors on the upgrade review page.
  15. Edit the New Site Settings page if required.
  16. Test the site functionality. The site should now be displayed with the Totara logos and theme.
  17. Disable server maintenance mode.
  18. Congratulations, your site is now running Totara.

Migrating from Moodle 3.5, 3.6, 3.7, and 3.8

It is also possible to migrate from Moodle 3.5, 3.6, 3.7 and 3.8 to Totara 13 using a CLI-only process, using a pre-migration script to transform the database to the Moodle 3.4.9 format. The requirements for this process are as follows:

  • Moodle 3.4.9 (build: 20190513)
  • Oracle database is not supported
  • MSSQL only: Database user requires additional permissions: ALTER SETTINGS(SERVER), and full text search must be enabled
  • All other requirements listed in readme.md

Follow these steps to complete the migration:

  1. Check the live logs to check if any users are currently using the site. The site will be offline while the upgrades are performed (Quick-access menu > Reports > Live Logs).
  2. Enable maintenance mode in Moodle (Quick-access menu > Server > Maintenance Mode).
  3. Back up the Moodle database.
  4. Back up the moodledata directory.
  5. Back up the Moodle source code directory.
  6. Verify that the full site backup can be restored on another server. We recommend to test the migration on a restored copy of the server first to see if you encounter any issues.
  7. If your Moodle version is below 3.4.9 then you must first upgrade to the 3.4.9 Moodle release before migrating to Totara.
  8. Make a list of all add-ons and customisations used on your site and confirm that they are compatible with Totara.
  9. Replace the Moodle source code with the latest Totara 13 source code, and only keep the original config.php file. Do not apply any customisations or add-ons yet.
  10. If your Moodle version is above 3.4.9 then ensure that Moodle is upgraded to one of the releases supported by the pre-migration script above.
  11. If necessary execute the pre-migration script server/admin/tool/premigration/cli/util.php from command line to transform the database to the Moodle 3.4.9 format.
  12. Perform a standard upgrade via command line or web interface.
  13. Re-enable external web access.
  14. Apply your local customisations and add in any required plugins, ensuring they are compatible with Totara as you go.
  15. Test your site's functionality to ensure that it works as expected.
  16. Disable server maintenance mode.
  17. Congratulations, your site is now running Totara.

Transforming the Moodle database

The process for migrating from newer versions of Moodle (higher than 3.4.9) to Totara requires you to execute a pre-migration step to transform the database to the Moodle 3.4.9 format.

The list of supported releases is updated regularly, and the following releases are currently supported in the pre-migration script:

  • Moodle 3.5.13 (Build: 20200713)
  • Moodle 3.5.14 (Build: 20200914)
  • Moodle 3.5.15 (Build: 20201109)
  • Moodle 3.6.10 (Build: 20200511)
  • Moodle 3.7.7 (Build: 20200713)
  • Moodle 3.7.8 (Build: 20200914)
  • Moodle 3.7.9 (Build: 20201109)
  • Moodle 3.8.4 (Build: 20200713)
  • Moodle 3.8.5 (Build: 20200914)
  • Moodle 3.8.6 (Build: 20201109)
  • Moodle 3.9.1 (Build: 20200713)
  • Moodle 3.9.2 (Build: 20200914)
  • Moodle 3.9.3 (Build: 20201109)

Migrating from older versions of Moodle

There are two paths for migrating from older versions of Moodle to Totara.

You must either upgrade to Moodle 3.4 and then to Totara 13

OR

Migrate from the version of Moodle you are running to the noted version of Totara, and then upgrade to Totara 13.

  • Migrate from Moodle 3.0 to Totara 9 then upgrade to Totara 13
  • Migrate from Moodle 3.2 to Totara 10 then upgrade to Totara 13
  • Migrate from Moodle 3.3 to Totara 12 then upgrade to Totara 13

Join the Totara Community for more resources to help you get the most out of Totara. 


© Copyright 2025 Totara Learning Solutions. All rights reserved.