---
title: "How to Import &#038; Export Role Definitions in Moodle"
description: "In this tutorial: Exporting Role Definitions Importing Role Definitions Beginning with Moodle 2.6 is the ability to Import and Export Role definitions. This allows you to share your role definitions,..."
url: https://www.inmotionhosting.com/support/edu/moodle/import-export-roles/
date: 2014-10-22
modified: 2020-10-08
author: "InMotion Hosting Contributor"
categories: ["Moodle"]
type: post
lang: en
---

# How to Import &#038; Export Role Definitions in Moodle

## In this tutorial:

[Exporting Role Definitions](#export) [Importing Role Definitions](#import)

Beginning with Moodle 2.6 is the ability to **Import** and **Export Role definitions**. This allows you to share your role definitions, or use them on other Moodle sites. In this tutorial we will show you how to Import and Export Role Definitions in Moodle.

## Exporting Role Definitions

1. [Login to your Moodle Administrator Dashboard](https://www.inmotionhosting.com/support/edu/moodle/moodle-login-administrator/).
2. In the *Administration* section, click **Site administration**–>**Users**–>**Permissions**–>**Define roles**. The image below shows you what order to click them in. [![Accessing Moodle role settings](https://www.inmotionhosting.com/support/wp-content/uploads/2014/10/moodle_import-export-role-definitions_defining-roles-moodle.png)](/support/wp-content/uploads/2014/10/moodle_import-export-role-definitions_defining-roles-moodle.png)
3. On the next page, click the **Role** you want to export. In my tests, I am exporting the *Manager* role.
4. You will now see a summary of the role you selected, click the **Export** button. You will then download the **.xml** file containing the role definitions. [![Moodle Role settings](https://www.inmotionhosting.com/support/wp-content/uploads/2014/10/moodle_import-export-role-definitions_exporting-role.png)](/support/wp-content/uploads/2014/10/moodle_import-export-role-definitions_exporting-role.png)

## Importing Role Definitions

1. [Login to your Moodle Administrator Dashboard](https://www.inmotionhosting.com/support/edu/moodle/moodle-login-administrator/).
2. In the *Administration* section, click **Site administration**–>**Users**–>**Permissions**–>**Define roles**. The image below shows you what order to click them in. [![Accessing Moodle role settings](https://www.inmotionhosting.com/support/wp-content/uploads/2014/10/moodle_import-export-role-definitions_defining-roles-moodle.png)](/support/wp-content/uploads/2014/10/moodle_import-export-role-definitions_defining-roles-moodle.png)
3. Click the **Add a new role** button on the bottom. You will then be on the *Adding a new role* page.
4. In the *Use role or archetype* menu, choose the type of role you want to import. Drag & drop the **.xml** file into the available field, then click the **Continue** button. [![Adding a new role in Moodle](https://www.inmotionhosting.com/support/wp-content/uploads/2014/10/moodle_import-export-role-definitions_adding-new-role.png)](/support/wp-content/uploads/2014/10/moodle_import-export-role-definitions_adding-new-role.png) The role definitions will then be imported, and you will be able to use them in your Moodle site.

Congratulations, now you know how to **import** and **export Role definitions** in Moodle website!
