Skip to content

API keys live in wp_options or DB tables, feels wrong.

Secrets in wp_options is common but not ideal. When you export the DB (for staging, support), they ride along. Move them to wp-config.php or env vars.

Try this first

  1. 1Inventory which secrets sit in wp_options: API keys (Stripe, Mailchimp, Sendgrid), webhook URLs, custom tokens.
  2. 2Move critical secrets to wp-config.php as constants: define('STRIPE_SECRET_KEY', 'sk_live_...'); read with getenv() or constant().
  3. 3Better still: use env vars via your hosting panel or a .env loader. Then the secret isn't in code and isn't in the DB.
  4. 4Plugins that write to wp_options (like WP Mail SMTP) often have a 'use constants' option. Enable it.
  5. 5Rotate secrets that lived in DB exports or backups. A backup on a laptop with unencrypted disk is a leak.
  6. 6Document in a runbook where each secret lives and who can rotate it. Key management on tribal knowledge is waiting for an incident.

When to bring us in

Dozens of secrets, external partners and compliance? A secret manager (1Password, HashiCorp Vault, AWS Secrets Manager) is the structural fix.

See also

None of the above fits?

Describe your situation below. We pass your input plus the steps you already saw to our AI and return tailored next-step advice. If it's too risky to DIY, we'll say so.

Who are you?

For the AI question we need your email and company, so we can follow up if the AI gets stuck, and to prevent abuse.

Limited to 2 questions per hour and 5 per day, kept lean so the AI stays useful. For more, contacting us directly works better for you and us.

Or skip the DIY entirely

Our Managed IT clients do not look these things up. One point of contact, a fixed monthly price, resolved within working hours.