Banner for Advanced Code Recipe Tutorial for Paid Memberships Pro

This advanced code recipe contains a SQL script to run against your WordPress site’s database. You can use Adminer, phpMyAdmin, or your host’s MySQL management tool of choice to execute the query.

The script will apply a membership level (by ID) and expiration (optional) to all users in the wp_users table that do not already have a membership level. This is useful for sites that already have a large number of “users” that you would like to be placed into a default membership level or a grandfathered-in membership level from an older system.

Our PMPro Toolkit Add On includes a script under the Tools menu of your dashboard to give existing non-member users a membership level without having to write SQL queries yourself.

For more advanced bulk member update or import features, see our Import Users from CSV Add On.

This content requires a premium membership plan.