• 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 » Security » Security Documentation » WP CLI Commands

WP CLI Commands

The WP-Members Security extension adds a number of subcommands to the wp mem command.

settings

This command will list the primary plugin settings, showing what is enabled and what is not enabled. Use the disable or enable commands to enable or disable a given command.

To list settings, use the following command:

wp mem sec settings

To enable/disable a setting, use the --enable=<option> or --disable=<option> subcommands. For example, to enable login lockout (which is option login_lockout), use the following command:

wp mem sec settings --enable=login_lockout

sessions

Handles various options for user sessions. Can list all sessions with the get subcommand. Can get sessions by user with wp mem sec sessions list --id=123 (where 123 is the user ID) or get all sessions with wp mem sec sessions list --all

The sessions command can search for a given session by username or email address (or a sub-string). For example, search for “mike” would return all usernames and emails that contain “mike”:

wp mem sec sessions search mike

The sessions command has subcommands to destroy a given session by ID:

wp mem sec sessions destroy --id=123

failed_logins

The failed_logins command can list all failed logins:

wp mem sec failed_logins list --all

It can also search for a specific username in the list:

wp mem sec failed_logins search myuser

You can page through the list with the page argument:

wp mem sec failed_logins list --page=2

Depending on your viewport, you may want to change the number of results in the default list (20) to more or less. For example, you can view 10 users per page of the list as follows:

wp mem sec failed_logins list --per_page=10

Add the --page argument to page through your custom per_page results:

wp mem sec failed_logins list --per_page=10 --page=2

lockouts

The lockouts command allows you to list and search user lockouts.

To list all lockouts, use the list subcommand:

wp mem sec lockouts list

Display “all” or “current” lockouts:

  • wp mem sec lockouts list --all
  • wp mem sec lockouts list --current

Search lockouts by username (default):

wp mem sec lockouts search someusername

Search lockouts by email (note: currently must be complete email of the user):

wp mem sec lockouts search email@example.com

Clear a lockout for a user by lockout ID (not user ID). The lockout ID displays in the results table of lockout list or search. Example where “123” is the lockout ID:

wp mem sec clear_lock 123

WP-Members Security

Plugin Info

Current Stable Version: 1.6.2
Minimum WordPress Version: 5.5
Tested up to WordPress Version: 6.8
Last Updated: 2025-05-07

Documentation

    • Setup
    • Options
    • Login Lockout
    • Ban List
    • Filter Hooks
    • Action Hooks
    • Change Log

Get the Plugin

  • Purchase the Plugin
  • Get the Pro Bundle

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