Grant Custom User access to the Staging Site

If you want to go give specific users access to the staging site but no access to the production site create a new user account with administration permission on the staging site. Make sure the same user does not exist on the production site or at least does not have admin permissions for the production site.

You can add a new user account from wp-admin > users

If you want to give a non-administrator account access to the staging site as well create a new user role or use an existing one and assign that particular user to that user role.

Then go to Staging site > WP Staging > Settings and give that particular user role access to the staging site:

A good member plugin that can create new user roles or assign specific permissions to a user account is the Members plugin.

Note: Administrators can log in to the staging site frontend and backend either way and do not need custom permissions.

Important: Whenever you push a staging site to the live website you will also copy users and their permissions to the production site. This means an administrator on the staging site will be able to access the production site after pushing.

To prevent this, exclude the tables _users and _usermeta from pushing!

Updated on July 3, 2023