MRN reCAPTCHA Enterprise Manager
MRN reCAPTCHA Enterprise Manager WordPress plugin
by MRN Web Designs · github.com/mrnwebdesigns/mrn-recaptcha-enterprise-manager
Install
No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:
wp plugin install https://github.com/mrnwebdesigns/mrn-recaptcha-enterprise-manager/archive/refs/heads/main.zipReadme
MRN reCAPTCHA Enterprise Manager
The canonical source lives in the independent mrnwebdesigns/mrn-recaptcha-enterprise-manager repository; MRN uses a local checkout symlink for stack integration.
Create Google reCAPTCHA Enterprise keys directly from WordPress and optionally sync generated keys to WPForms.
What this plugin does
- Stores Google project + service account credentials in plugin settings.
- Creates reCAPTCHA Enterprise website keys via Google API.
- Retrieves the key's legacy secret key for third-party compatibility.
- Optionally syncs the generated site key + legacy secret key to WPForms global CAPTCHA settings.
- Optionally bulk-enables WPForms form-level reCAPTCHA for existing forms.
- Optionally auto-enables WPForms form-level reCAPTCHA for newly created forms.
- Uses a tabbed admin screen (
CredentialsandCreate Key) with optional MRN sticky toolbar support when available.
Requirements
- WordPress admin access (
manage_options). - Google Cloud project with reCAPTCHA Enterprise API enabled.
- A service account key JSON (or equivalent service account email + private key).
- Service account role with reCAPTCHA Enterprise key management permissions (typically reCAPTCHA Enterprise Admin).
Recommended deployment mode (code-locked)
For client websites, do not store service account secrets in the database UI.
Set credentials in wp-config.php or server environment variables with these names:
MRN_RECAPTCHA_ENTERPRISE_PROJECT_IDMRN_RECAPTCHA_ENTERPRISE_SERVICE_ACCOUNT_EMAILMRN_RECAPTCHA_ENTERPRISE_PRIVATE_KEYMRN_RECAPTCHA_ENTERPRISE_ALLOWED_DOMAINS(comma-separated)MRN_RECAPTCHA_ENTERPRISE_DEFAULT_INTEGRATION_TYPE(SCOREorCHECKBOX)
Example wp-config.php constants
define( 'MRN_RECAPTCHA_ENTERPRISE_PROJECT_ID', 'client-prod-project' );
define( 'MRN_RECAPTCHA_ENTERPRISE_SERVICE_ACCOUNT_EMAIL', 'recaptcha-manager@client-prod-project.iam.gserviceaccount.com' );
define( 'MRN_RECAPTCHA_ENTERPRISE_PRIVATE_KEY', "-----BEGIN PRIVATE KEY-----\n...\n-----END PRIVATE KEY-----\n" );
define( 'MRN_RECAPTCHA_ENTERPRISE_ALLOWED_DOMAINS', 'example.com, www.example.com' );
define( 'MRN_RECAPTCHA_ENTERPRISE_DEFAULT_INTEGRATION_TYPE', 'SCORE' );
When these values are present, the plugin enters code-locked mode and those fields become read-only in wp-admin.
Usage flow
- Activate the plugin.
- Add the constants above (or same-named env vars) on the server.
- Open
Settings > reCAPTCHA Enterprise. - Create a key and retrieve legacy secret.
- Keep "Apply to WPForms" checked to auto-sync to WPForms settings.
- Leave "Also enable reCAPTCHA on all existing WPForms forms now" checked to roll out form-level toggle to old forms.
- In
Credentials, keep "Automatically enable Google reCAPTCHA on newly created WPForms forms" enabled for new forms.
Stack rollout secrets (recommended)
For MRN stack rollouts, keep secrets in stack-managed secret files (gitignored) and let bootstrap inject constants into each new site's wp-config.php.
Local paths in this repo:
/Users/khofmeyer/Development/MRN/stack/secrets/recaptcha-enterprise-project-id.txt/Users/khofmeyer/Development/MRN/stack/secrets/recaptcha-enterprise-service-account-email.txt/Users/khofmeyer/Development/MRN/stack/secrets/recaptcha-enterprise-private-key.pem/Users/khofmeyer/Development/MRN/stack/secrets/recaptcha-enterprise-allowed-domains.txt(optional)/Users/khofmeyer/Development/MRN/stack/secrets/recaptcha-enterprise-default-integration-type.txt(optional:SCOREorCHECKBOX)
Expected server path (stack manager host):
/home/mrndev-stack-manager/stack/secrets/
Bootstrap script support:
/Users/khofmeyer/Development/MRN/stack/scripts/site-bootstrap.sh
Supported override env vars (optional):
STACK_RECAPTCHA_ENTERPRISE_PROJECT_IDSTACK_RECAPTCHA_ENTERPRISE_SERVICE_ACCOUNT_EMAILSTACK_RECAPTCHA_ENTERPRISE_PRIVATE_KEYSTACK_RECAPTCHA_ENTERPRISE_ALLOWED_DOMAINSSTACK_RECAPTCHA_ENTERPRISE_DEFAULT_INTEGRATION_TYPE
Security notes
- Private key material is stored encrypted with a key derived from
wp_salt( 'auth' ). - Creation/sync actions require
manage_optionsand a valid nonce. - In code-locked mode, runtime credentials come from constants/env instead of option storage.