WP Manifestindependent plugin directory
manifest / admin / wp-config-manager-pro

WP Config Manager Pro

WP Config Manager Pro plugin for WordPress

by Qodo AI · github.com/gabinext/wp-config-manager-pro

0stars
0forks

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/gabinext/wp-config-manager-pro/archive/refs/heads/main.zip

Production-ready WordPress plugin to safely manage wp-config.php constants via an admin UI with backups, diffs, and rollback.

Features

  • Secure admin page under Tools → WP Config Manager
  • Tokenizer-based wp-config.php parser (no naive regex)
  • Add/update/remove define() statements
  • Backup before write, unified diff preview, rollback & backup list
  • Atomic writes and PHP syntax validation
  • Nonce and capability checks, dangerous combination guards
  • Registry-driven metadata for constants, categories, risk, defaults
  • Environment profiles: development, staging, production

Structure

  • wp-config-manager-pro.php (bootstrap + autoload)
  • includes/
    • Plugin.php (wiring & hooks)
    • Services/Container.php (light DI)
    • Registry/ConfigRegistry.php (constants metadata)
    • Parser/WpConfigParser.php (tokenizer-based parser)
    • Writer/WpConfigWriter.php (backups, diff, write, rollback)
    • Admin/AdminPage.php (Settings API UI, diff/apply, backups)

Security

  • Only administrators (manage_options) may access page
  • Nonce verification on apply and rollback
  • Prevent apply if wp-config.php is not writable
  • Guard: cannot enable WP_HTTP_BLOCK_EXTERNAL without WP_ACCESSIBLE_HOSTS

Usage

  1. Install the plugin in wp-content/plugins/WP-Config-Manager-Pro
  2. Activate plugin in wp-admin → Plugins
  3. Go to Tools → WP Config Manager
  4. Toggle desired constants, set values, click Preview Changes
  5. Review diff, then Apply Changes
  6. Use Backups & Rollback to restore previous versions if needed

Notes

  • Writer attempts php -l for syntax check if available in system PATH. If not, it assumes OK.
  • Insertions are placed before the wp-settings.php include when detected, otherwise appended at the end of file.

Extensibility

  • Add new constants by extending ConfigRegistry::get_constants
  • UI is registry-driven; new items appear automatically
  • Parser and Writer are decoupled and testable

License GPLv2 or later