How to Export and Import WordPress User Permissions
This week, a PublishPress user asked us an interesting question:
“I was wondering if there is a way for us to copy-and-paste roles and permissions over from one website to another website, so that we don't have to set up the permissions for each website we have to make.”
The answer to that question is “Yes”, thanks to the PublishPress Capabilities plugin.
This tutorial should be effective for any permissions that are created using the normal WordPress permissions system.
After installing PublishPress Capabilities, you can check that your permissions are exportable by going to “Capabilities” in your WordPress admin area. If you see the permissions on this screen, they can be exported. If you can not see your permissions, you'll need to talk with the developers of the plugin that creates those permissions.
Step #1. Create your backup
- Go to “Capabilities” then “Backup”.
- Click the blue “Do Action” button. This will create a backup of your current site's roles and capabilities.
Step #2. Export and Import your backup
This step will need database access. You require phpMyAdmin or a similar database tool.
- Find your WordPress database.
- Find the wp_options table. Note that the actual table name will have the database prefix which was defined for your site.
- Find the row with option_name capsman_backup.
- If you don't have a capsman_backup row, use the capsman_backup_initial row.
Export this capsman_backup row. You can either export it using your database tool, or you can edit the row and copy-paste the content:
Now you can go to your other WordPress site.
- Find the wp_options table (with your database prefix)
- Find the row with option_name capsman_backup or capsman_backup_initial.
- Replace this row's option_value with the option_value data from the other site.
Step #3. Install the new permissions
Now we need to install the permissions that we've just imported.
- Log in to your new site.
- Go to “Capabilities”, then “Backups”.
- Choose “Restore last saved backup”.
- Click “Do Action”.
You'll see a message “Roles and Capabilities restored from last backup.”
Step #4. Test your new permissions
Finally, don't just assume this has worked. Test your new site and make sure the permissions have imported correctly.
If something is wrong, you can visit the Users > Capabilities screen and make adjustments to the permissions.
More PublishPress Capabilities tutorials
- Hide other author posts in the WordPress admin area
- How to export and import WordPress user permissions
- Block WordPress users from creating higher-level users
- How to delete WordPress user roles
- Control who can delete media files in WordPress
- Stop WordPress users from editing their published posts
Get full PublishPress access
The Pro versions of PublishPress plugins are packed with extra features to help you manage your content. Get a PublishPress membership today for full access: