• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

RocketGeek

Home of WP-Members, The Original WordPress Membership Plugin

  • WordPress Plugins
    • WP-Members
      • FAQs
      • Quick Start
      • Documentation
      • Extensions
    • Advanced Options
      • Documentation
      • Purchase the Plugin
      • Get the Pro Bundle
    • Download Protect
      • Documentation
      • Purchase the Plugin
      • Get the Pro Bundle
    • Invite Codes
      • Documentation
      • Purchase the Plugin
      • Get the Pro Bundle
    • MailChimp Integration
      • Documentation
      • Purchase the Plugin
      • Get the Pro Bundle
    • PayPal Subscriptions
      • Documentation
      • Purchase the Plugin
      • Get the Pro Bundle
    • Salesforce Web-to-Lead
    • Security
      • Documentation
      • Purchase the Plugin
      • Get the Pro Bundle
    • Text Editor
      • Purchase the Plugin
      • Get the Pro Bundle
    • User List
      • Documentation
      • Purchase the Plugin
      • Get the Pro Bundle
    • User Tracking
      • Documentation
      • Purchase the Plugin
      • Get the Pro Bundle
    • Memberships for WooCommerce
    • WordPass
  • Blog
    • Basics
    • Tips and Tricks
    • Filters
    • Actions
    • Code Snippets
    • Shortcodes
    • Design
    • Release Announcements
  • Store
    • Cart
    • Checkout
  • Contact
  • Log In
  • Show Search
Hide Search
Home » Plugins » WP-Members » Documentation » WP-CLI Commands

WP-CLI Commands

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.

get

The get command allows you to run sub commands to “get” a number of different data elements:

  • wp mem get hidden Displays a list of posts marked as “hidden”
  • wp mem get block_value --id=<post_ID> Gets the numeric value of the block setting
  • wp mem get status --id=<post_ID> Gets the status of requested post (restricted, unrestricted, or hidden)

set

The set command allows you to set the status of specific post to restricted, unrestricted, or hidden.

wp mem set status --id=<post_ID> --status=<unblock|unrestrict|hide|block|restrict>

refresh-hidden

This command recalculates the post IDs in the hidden posts array.

wp mem refresh-hidden

settings

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).

user

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.
  • Getting Started
  • Recommended WordPress® Settings
  • Plugin Settings
    • Options
    • Fields
    • Dialogs
    • Emails
    • New Feature Settings
  • Managing Content
    • Restricting Posts
    • Restricting Pages
    • Show Excerpts
    • Custom Post Types
  • Managing Users
    • Import Users
    • Export Users
    • Edit Users
    • Search Users
  • Login
  • Registration
    • Choosing Fields
    • Create a Registration Page
    • Moderating Registration
    • Using CAPTCHA
    • Removing Registration Options
  • User Profile
  • Memberships
    • Membership Properties
    • Membership Levels
  • Menus
    • Individual Menu Items
    • Logged In Menus
    • Login/Logout Menu Link
  • Customizing Emails
    • Email Address
    • Email Content
    • Email Format
    • Email Shortcodes
    • Email Troubleshooting
  • Customizing Forms
    • Create a Custom Stylesheet
    • Using the WordPress Customizer
    • Login Form HTML
    • Registration Form HTML
    • Widget Login Form HTML
  • Translation and Localization
    • Maintain a custom translation file
    • Filter untranslated strings
    • Multi-language Considerations
  • Shortcodes
    • Pages and Forms
    • Login Status
    • User Fields
    • Memberships
    • Email
    • Other Shortcodes
  • WP-CLI Commands
  • API Functions
  • Filter Hooks
  • Action Hooks
  • FAQs
    • Email troubleshooting
    • Passwords are not being included in Emails
    • The plugin isn’t blocking my content
    • Are files protected?
    • How can I prevent registration spam?
    • How to add a shortcode
    • How to apply login redirects
    • Why can’t users log in?
    • Why does reCAPTCHA v3 fail?
    • Troubleshooting Really Simple Captcha
    • Why do I get a 403 error?
    • How do I use code snippets?
    • My changes aren’t showing up
    • How to hide the “Admin Bar”
    • How to add a forgot password link
    • Password reset doesn’t show any fields
    • Domain not included in the password reset link
    • There was an error processing the form
    • Hidden vs. Restricted
  • Demo Videos
  • How to Request Support
  • Copy Settings for Support
  • Hosting Recommendations

Ready to get started?

Join Today!

© 2025 · butlerblog.com · RocketGeek is built using WordPress, WP-Members, and the Genesis Framework

  • butlerblog.com
  • WP-Members Support Subscription
  • Terms of Service
  • Privacy Policy
  • Refund Policy