wp2shell: more than a month later. Confirm 6.8.6, 6.9.5, 7.0.2. Patched is not clean.

Read the advisory

wp-config.php

Definition

wp-config.php holds database credentials, keys, and core WordPress settings for the site.

Also called: wp-config, wp config

Why it matters for WordPress

If wp-config.php leaks, attackers get database access and authentication salts. Malware also loves to inject PHP here because the file loads on every request. One quiet edit can persist long after you delete an obvious webshell.

How it shows up in practice

  • Database name, user, password, and table prefix in plain PHP constants
  • AUTH_KEY and related salts that sign cookies and nonces
  • Flags like DISALLOW_FILE_EDIT, WP_DEBUG, and custom memory limits
  • Integrity alerts when the file changes and nobody deployed

What to do

  1. Keep the file outside the web root when the host supports it, or at least non-readable to the world.
  2. Never commit real secrets to a public git repo.
  3. Turn off public debugging on production (WP_DEBUG display off).
  4. After a breach, rotate DB passwords and regenerate salts.
  5. Watch integrity scans for unexpected edits to this file.

Nearby ideas in the dictionary

All terms →

Larger screenshot