How to Export and Import WordPress User Capabilities

This week, a PublishPress user asked us the following question:

“Can we 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.


Exporting and Importing with a Plugin

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.

User capabilities for editor

In PublishPress Capabilities, you'll find a “Export / Import” tab by going to the “Backup” link.

This feature allows you to download all the roles and capabilities from one site and import them into another site. This export will include not just the basic capabilities, but also extra features such as “Editor Features”, “Admin Features”, “Admin Menus”, and “Nav Menus”.

Export / import capabilities

Once you've exported the settings, you can now use the “Import Settings” tool to import the settings to a new site. You will need to also have the PublishPress Capabilities plugin installed on that site.

Import user roles and capabilities

Backup Data in Your Database

The PublishPress Capabilities backups are stored in your site's database. You can access them via 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 or capsman_backup_initial.
WordPress Capabilities back in database

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:

WordPress Capabilities back in database row

If you want more on this, check out our complete guide to WordPress user permissions in the database.

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_last_backup or capsman_backup_initial.
  • Replace this row's option_value with the option_value data from the other site.

PublishPress Summary

Whichever method you choose, take the time to test afterwards. Check your new site and make sure the permissions have imported correctly. You can use the “User Testing” feature in PublishPress Capabilities to check each role.

If test and find something is wrong, you can visit the “Capabilities” screen and make adjustments to the user access.

Join PublishPress today and you'll get powerful publishing and permissions plugins to improve your WordPress site.

PublishPress Capabilities icon
  • Steve is the founder of PublishPress. He's been working with open source software for over 20 years. Originally from the UK, he now lives in Sarasota in the USA. This profile is generated by the PublishPress Authors plugin.

Leave a Reply

Your email address will not be published. Required fields are marked *