Below is the recommended method to migrate Moodle.
Use this method in the following scenarios:
- Moodle site from one server to another. For example, moving a Moodle site from a shared hosting service's server to a dedicated server.
- Creating a duplicate/shadow copy of Moodle in the same server.
Here, I am showing migrate Moodle following the second method as I want to create a same copy on the same server with a different domain.
Please follow the below steps: