Primary

Migration Guide

With Groups 2.x a new model of access control is introduced where various post types are restricted by groups instead of capabilities.

The following guide will help you migrate to the new model.

First, please make sure to take a full backup of your site and its database!

Once you have updated to Groups 2.x, check that Legacy Access Control is enabled, in your Dashboard under Groups > Options.

Groups Legacy Settings

The use case scenario is this:

We’ll assume you want to use group-based restrictions for all pages protected until now with a premium capability. You should create the Premium group if it doesn’t already exist now. If you have many posts, you might want to increase the number displayed per page for what comes next.

In order to be able to use the Premium group, your user account must either have permission to Administer Groups or it must be assigned to that group. To adjust this for another user, you can log in as an administrator and after visiting the User Profile, select all the relevant groups in the Groups select box. If you’re going to make the adjustment as an Administrator with permission to Administer Groups, you’ll be allowed to use the groups directly.

  1. Go to Pages and use the access restrictions filter on top of the list, to select one access restriction. Let’s assume that you have one restriction called premium there, select it from the dropdown.
  2. Hit the Filter button. Now you have your list of pages that are restricted by that capability.
  3. Use the checkbox on top of the list to select all.
  4. In the Bulk Actions dropdown select Edit.
  5. Click Apply.
  6. In the Groups section of the bulk actions select to Add restriction.
  7. Choose the Premium group.
  8. Click the Update button to save the modifications.

The necessary steps are marked in red on the following screenshot.

Groups bulk edit pages

Now all the pages in the list should carry the group-based access restriction and the previous capability-based restriction.

Depending on the number of posts displayed per page, you might need to repeat this for the remaining pages.

Do the same thing for all access restriction capabilities, creating new groups when necessary.