WP CLI commands for the WordPress SAML SSO Premium Plugin.


Custom Commands


1. Verify License

  • Configure the miniorange-saml-20-single-sign-on/license.json file with your customer details.
Value Name Value Description
admin_email miniOrange account email used for purchasing the license
customer_key Customer Key from your miniOrange dashboard>>Settings>>Product Settings
customer_api_key Customer API Key
customer_token_key Customer Token Key
###SiteDomain### The domain of your WordPress site where you want to activate the plugin
mo_saml_license_key License key you want to use on a particular domain (You can add multiple domains to make a common license file).
{
    "admin_email": "***********@example.com",
    "customer_key":"18****",
    "customer_api_key":"S*************************",
    "customer_token_key": "2p************",
    "###SiteDomain###": {
        "mo_saml_license_key": "9G*************"
    }
}
  • Run the command:
    wp saml activate --file=license.json --domain=example.com
  • If the license is applied successfully, you will receive a success message otherwise please contact us at samlsupport@xecurify.com .

2. Import Plugin Configuration

  • Copy your exported JSON configuration file in the miniOrange plugin root directory. (miniOrange-saml-20-single-sign-on/config.json)

  • Run the command:

    wp saml fetch --config=config.json

3. Update Plugin

Added to version 12.1.8 and above

  • Pre-requisite: As of PHP 8.2.0, php_zip.dll DLL must be enabled in php.ini. Previously, this extension was built-in.
    wp saml update

WordPress Commands


1. Identity Provider Settings

Option Name Type Purpose
mo_saml_sp_base_url URL Configure base URL for all metadata configuration
mo_saml_sp_entity_id String without special characters Configure the SP EntityID / Issuer field
Wp option update mo_saml_sp_base_url https://example.com

2. Redirection and SSO links settings formatting

Option Name Required Type Purpose
mo_saml_relay_state Yes String Link where users will be redirected each time after SSO
mo_saml_registered_only_access Yes Boolean Redirect to IDP if the user is not logged in. [PROTECT COMPLETE SITE]
mo_saml_force_authentication Yes Boolean Force authentication with your IDP on each login attempt
mo_saml_enable_login_redirect Yes Boolean Redirect to IdP from the WordPress Login Page
mo_saml_allow_wp_signin No Boolean Whether to enable a backdoor or not.
mo_saml_backdoor_url No String Parameter to be added for *saml_sso=
mo_saml_redirect_to_wp_login No Boolean Redirect to the WP Login page
mo_saml_add_sso_button_wp No Boolean Add a Single Sign-on button on the WordPress login page
mo_saml_use_button_as_shortcode No Boolean Use the button as ShortCode
mo_saml_use_button_as_widget No Boolean Use the button as Widget
  • This command will setup backdoor URL as https://<domain>/wp-admin/?saml_sso= vdjRkdirmUTI

    Wp option update mo_saml_backdoor_url vdjRkdirmUTI
  • This command will enable auto-redirect to IDP from the WordPress login page option.

    Wp option update mo_saml_enable_login_redirect true

For more information visit our WordPress SSO page.

If you need any assistance, Please reach out to us at samlsupport@xecurify.com.