> ## Documentation Index
> Fetch the complete documentation index at: https://kb.hosting.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Adding custom permissions for WordPress roles

> Learn how to configure custom permissions for WoredPress roles.

[WordPress](https://hosting.com/hosting/platforms/wordpress-hosting/managed-wordpress-hosting/) uses the concept of Roles to give the site owner control over what users can and cannot do on the site. By assigning each user a specific role, a site owner can manage user access to tasks such as writing and editing posts, creating pages, creating categories, moderating comments, managing plugins, managing themes, and managing other users. [WordPress](https://hosting.com/hosting/platforms/wordpress-hosting/managed-wordpress-hosting/) has six predefined roles: Super Admin, Administrator, Editor, Author, Contributor, and Subscriber, each with its own set of predefined permissions. But what if you want to give each role its additional custom set of permissions, like having  new users to be able to edit pages? This article will show you how to add custom permissions to WordPress roles.

## Configuring custom permissions for WordPress roles

1. Log in to your WordPress site with an administrator account.

2. On the **Dashboard** in the left sidebar, click **Appearance**, and then click **Editor**:\
   ![](https://static.hosting.com/kb/kb_wp_customtwitter_addnew.png)

3. On the **Theme Editor**, select the **Theme** you want to edit from the dropdown:\
   ![](https://static.hosting.com/kb/kb_wp_themeeditor_stylesheet.png)

4. The files for this selected theme are listed on the right column under Theme Files. Click on the file named "**functions.php**":\
   ![](https://static.hosting.com/kb/kb_wp_themeeditor_themefunction.png)

5. Add this code snippet / function at the bottom of your functions.php file:

```
$result = add_role( 'new', __( 

'New' ),

array( 

'read' = true, // so users can read

'edit_posts' = false, // so users can edit their own posts

'edit_pages' = true, // so users can edit pages

'edit_others_posts' = false, // so users can edit other author's posts

'create_posts' = false, // so users can create new posts

) 

);
```

6. With the above code snippet, you can turn the permission on / off by simple true / false value.

<Note>
  unfiltered\_upload – This capability is not available to any role by default (including Super Admins). The capability needs to be enabled by defining the following constant:
</Note>

```
define( 'ALLOW_UNFILTERED_UPLOADS', true );
```

## Related articles

* [Add author profile fields in WordPress](/docs/custom-field-forms-for-user-profile-in-wordpress)

* [Adding extra user profile fields in WordPress](/docs/adding-extra-user-profile-fields-in-wordpress)

* [Changing a WordPress account username](/docs/changing-a-wordpress-account-username)
