As of version 3.3.5, there are WP-CLI commands included within the plugin. If you already have WP-CLI installed, you don’t need to do anything to use the WP-Members CLI commands – they are available when the plugin is activated. (Note that most hosts now include WP-CLI as standard, so you probably do not need to install it yourself.)
The following commands for the plugin are a subset of the wp mem
command, which will display the sub commands available.
wp mem get_block_value <post_ID>
Gets the numeric value of the block setting
wp mem get_hidden_posts
Displays a list of posts marked as “hidden”
wp mem post_status <post_ID>
Gets the status of a post (unblocked, blocked, hidden)
wp mem refresh_hidden_posts
Recalculates the post IDs in the hidden posts array
wp mem set_post_status <post_ID> <status: unblock|unrestrict|hide|block|restrict>
The following commands are a subset of the wp mem settings
command, which will display the sub commands available.
wp mem settings content
Displays the content settings for each post type.
wp mem settings options
Displays the plugin’s option settings.
wp mem settings enable <option>
Enables the specified option.
wp mem settings disable <option>
Disables the specified option.
wp mem settings pages list
Lists information for the login, register, and user profile page settings.
wp mem settings pages clear [--all] [--login] [--register] [--profile]
clears specified page settings (and use more than one option at a time).
wp mem settings pages set [--login=<ID>] [--register=<ID>] [--profile=<ID>]
sets specified page settings to the ID specified (can do more than one option at a time).
The following commands are a subset of the wp mem user
command, which will display the sub commands available.
wp mem user list <pending|activated|deactivated>
Gets list of users by status.
wp mem user get_pending
Gets a list of pending users (when moderated registration is enabled).
wp mem user get_activated
Gets a list of activated users (when moderated registration is enabled).
wp mem user get_deactivated
Gets a list of deactivated users (when moderated registration is enabled).
wp mem user activate [--id=<user_id>]
Activates the specified user ID, sends email by default (disable email to user with --notify=false
).
wp mem user deactivate [--id=<user_id>]
Deactivates the specified user ID.
wp mem user detail <username> [--all]
Gets user meta for a requested user. --all
lists all user meta, otherwise just WP-Members fields.