🔥 Black Friday Sale: Get 65% OFF Any PageForge Pro Plan! Use code BF65 Claim Offer →
Compte Get it free
PHP Constants Manager icon
Maintenu Testé avec WP 7.1

PHP Constants Manager

Safely manage PHP constants (defines) through the WordPress admin or WP-CLI with full CRUD functionality and comprehensive viewing capabilities.

Installations actives10+10+ niveaux
Téléchargements · 30D99▲ +30.3% vs prev. 30d
Évaluation5/51 avis
Score de santé63/100Bon
Téléchargements de tous les temps1.1KDepuis juin 2025
Support résolu—Aucun fil de discussion récent
A besoin deWP 5.0PHP 7.4+
Téléchargements · 7j17▼ -39.3% week over week
Notre verdict

Choix solide

PHP Constants Manager is a solid plugin choice in 2026, with a few things worth checking first. It runs on 10+ sites, is rated 5/5 and was last updated 3 months ago, and scores 63/100 on our health check.

  • Testé avec le dernier WordPress (7.1)
  • Petite base d'utilisateurs (plus de 10 installations actives)
  • Très peu de critiques jusqu'à présent

Comment s'accumule-t-il ?

Côte à côte sur les installations, les mises à jour, les évaluations et le support

Téléchargements quotidiens

135Aug 31Oct 14Nov 28
Hier2
Moyenne quotidienne (1 ans)2
Jour de pointe3325 Août 2026
12 Derniers mois815

Les pics de téléchargement suivent généralement une nouvelle version - chaque site qui met à jour automatiquement compte comme un téléchargement.

Classements

Where PHP Constants Manager stands today

WordPress.org Classements de recherche

Position en direct dans la recherche de plugins, Top 100
Mot-cléPositionPlugins concurrentsCatégorie
administrateur >100 10,000 Meilleurs plugins administrateurs →
configuration >100 10,000 Best configuration plugins →
Constants #10 4,353 Best Constants plugins →
defines >100 6,156 Best defines plugins →
php #49 10,000 Meilleurs plugins PHP →

Adoption de version

Part de sites actifs par version.

  • 1.2100.0%

Répartition des notes

★★★★★ ★★★★★ 5 sur 1 avis

  • 5★100.0%
  • 4★0.00%
  • 3★0.00%
  • 2★0.00%
  • 1★0.00%

About PHP Constants Manager

À partir du Lisez-moi officiel · v1.2.2

Description

PHP Constants Manager provides a secure and user-friendly interface for managing PHP constants in WordPress. No more editing wp-config.php or theme files to add or modify constants!

Principales caractéristiques

  • Complete Constant Management: Create, read, update, and delete PHP constants from the WordPress admin
  • Dual View System: “My Constants” for your custom constants and “All Constants” to view every constant in your WordPress installation
  • Native WordPress UI: Built using WP_List_Table with sorting, searching, and bulk actions
  • Multiple Data Types: Support for String, Integer, Float, Boolean, and NULL constant types with strict validation
  • Real-time Validation: Form fields validate values against selected type with immediate feedback
  • Active/Inactive States: Toggle constants on/off without deleting them
  • Conflict Detection: Visual indicators show when constants are already defined elsewhere (predefined)
  • Screen Options: Customize table views with adjustable items per page and column visibility controls
  • Early Loading Option: Optional must-use plugin creation for loading constants before other plugins
  • Load Order Awareness: Constants loaded during plugins_loaded action (priority 1) for broad compatibility
  • Comprehensive Help: Built-in help system with detailed documentation and best practices
  • Administrator Only: Secure access restricted to users with manage_options capability
  • Database Storage: Constants stored safely in a custom database table with full audit trail
  • Import/Export: Backup and migrate constants using CSV files with detailed error reporting
  • WP-CLI Integration: Manage constants, import/export CSV, and toggle early loading from the terminal via wp phpcm ... — ideal for automation, CI/CD, and multi-site provisioning

Understanding Predefined Constants

The plugin intelligently detects when constants are already defined by WordPress core, other plugins, or your theme:
* Not Predefined: Your constant is unique and will work normally
* Predefined: The constant exists elsewhere – your definition is saved but won’t override the existing value due to PHP’s constant rules

Cas d'utilisation

  • Manage environment-specific configuration
  • Toggle debug constants without file editing
  • Store API keys and configuration values securely
  • Create fallback constants for different environments
  • Document constant purposes with built-in descriptions
  • Audit all constants in your WordPress installation
  • Backup constants to CSV files for migration between sites
  • Import constants in bulk from properly formatted CSV files
  • Automate site setup and deployment pipelines with WP-CLI (wp phpcm add MY_KEY ...)

WP-CLI Commands

When WP-CLI is available, the plugin registers a phpcm command suite that mirrors the admin UI:

  • wp phpcm list [--active] [--inactive] [--type=<type>] [--search=<term>] [--format=<format>] — list managed constants
  • wp phpcm get <name> — show a single constant (supports --field=<field>)
  • wp phpcm add <name> [<value>] [--type=<type>] [--description=<text>] [--inactive] [--porcelain] — create a constant (value can be - to read from stdin)
  • wp phpcm update <name> [--value=<value>] [--type=<type>] [--description=<text>] [--active|--inactive] — update fields
  • wp phpcm delete <name>... [--yes] — delete one or more by name
  • wp phpcm activate|deactivate|toggle <name>... — flip active state
  • wp phpcm defined <name> — report whether the constant is currently defined and by whom (this plugin, early-load, or elsewhere like wp-config.php)
  • wp phpcm all-defines [--user-defined] [--search=<term>] — inspect every PHP constant present in the process
  • wp phpcm status — plugin health summary (table, row counts, early-loading state)
  • wp phpcm import <file|-> [--overwrite] — import CSV (file path or stdin)
  • wp phpcm export [<file>] [--active] [--inactive] [--type=<type>] — write CSV to a file or stdout
  • wp phpcm early-loading enable|disable|status — manage the must-use plugin that loads constants before all other plugins

Run wp help phpcm <subcommand> for detailed usage, flags, and examples.

Developer Information

Database Schema

The plugin creates a custom table {prefix}phpcm_constants with the following structure:
* id – Primary key (auto-increment)
* name – Constant name (unique, varchar 191)
* value – Constant value (longtext)
* type – Data type (enum: string, integer, float, boolean, null)
* is_active – Whether the constant is loaded (tinyint)
* description – Optional description (text)
* created_at – Creation timestamp (datetime)
* updated_at – Last update timestamp (datetime)

WordPress Hooks Used

  • plugins_loaded (priority 1) – Early constant loading for maximum compatibility
  • admin_menu – Menu registration
  • admin_post_* – Form submission handling
  • wp_ajax_* – AJAX operations
  • WP_CLI::add_command('phpcm', ...) – Registers the CLI command when WP-CLI is available

Load Order & Compatibility

Constants are defined during plugins_loaded with priority 1, ensuring they are available to:
* All theme functions and templates
* Other plugins (unless using higher priority)
* WordPress core hooks like init, wp_loaded, etc.

Security Implementation

  • Capability requirement: manage_options (administrators only)
  • Nonce verification on all form submissions and AJAX requests
  • SQL injection prevention with prepared statements
  • Input sanitization using WordPress core functions
  • Output escaping for all displayed data

Code Standards

This plugin follows WordPress coding standards and best practices:
* PSR-4 autoloading structure
* WordPress database abstraction layer
* Internationalization ready
* WP_List_Table implementation
* Standard WordPress admin UI patterns

Installation

  1. Téléchargez le dossier php-constants-manager dans le répertoire /wp-content/plugins/
  2. Activez le plugin via le menu « Plugins » dans WordPress
  3. Navigate to ‘PHP Constants’ in the WordPress admin menu
  4. Start managing your constants!

The plugin will automatically create the necessary database table upon activation.

Journal de modifications

1.2.2

  • Bumped WordPress compatibility to 7.1
  • Guard wp_cache_flush_group() behind a function check so caching works on WordPress 5.0–6.0

1.2.1

  • Ensure WP 7.0 Compat

1.2.0

  • WP-CLI support: manage constants from the terminal with wp phpcm list|get|add|update|delete|activate|deactivate|toggle|defined|all-defines|status|import|export|early-loading
  • Refactored shared casting, validation, and formatting helpers into includes/phpcm-helpers.php — the generated must-use loader now reuses them instead of duplicating logic
  • Extracted CSV import/export into PHPCM_Import_Export so the admin UI and CLI share the same parser and writer

1.1.5

  • Renamed must-use plugin to attempt to get it to load earlier than other must-use plugins

1.1.4

  • Durcissement de sécurité

1.1.3

  • Enhanced file upload validation with proper isset() checks for $_FILES array indices
  • Improved input sanitization for file upload security

Journal des modifications complet sur WordPress.org →

Captures d'écran

"My Constants" page showing custom constants with full management capabilities
"My Constants" page showing custom constants with full management capabilities
"All Constants" page displaying every constant in the WordPress installation
"All Constants" page displaying every constant in the WordPress installation
Add new constant form with data type selection and description field
Add new constant form with data type selection and description field
Settings page with Early Loading option for must-use plugin creation
Settings page with Early Loading option for must-use plugin creation
Import/Export page with CSV upload and download functionality
Import/Export page with CSV upload and download functionality
Screen Options panel for customizing table display preferences
Screen Options panel for customizing table display preferences
Help page with comprehensive documentation and best practices
Help page with comprehensive documentation and best practices

Pour les développeurs

Est-ce votre plugin ? Montrez les chiffres.

Ajoutez un badge en direct à votre site, docs ou github readme. Il se met à jour par lui-même - aucun compte n'est nécessaire.

Badge d'installations actives Badge Badge de score de santé

Best PHP Constants Manager alternatives

Tous les plugins d'administrateur →
Alternatives
Rang Plugin Installations actives Évaluation Mise à jour Santé
1 Identifiant Identifiant Loginizer est un plugin de sécurité WordPress qui vous aide à lutter contre les attaques brutes. par Softaculous 1M+ ★★★★★★★★★★ 4.8 (1K) il y a 1 semaine 91
2 Cadre Redux Cadre Redux Redux est un framework d'options simple, vraiment extensible et entièrement réactif pour WordPress… par David Anderson / Updraft de l'équipe 800K+ ★★★★★★★★★★ 4.4 (273) il y a 1 jour 80
3 Éditeur de menus administrateur Éditeur de menus administrateur Vous permet de modifier le menu Admin WordPress. Vous pouvez commander à nouveau, masquer ou renommer des menus, ajouter des informations personnalisées… par Janis Elst 300K+ ★★★★★★★★★★ 4.6 (312) Il y a 2 semaines 80
4 Étiquette blanche CMS Étiquette blanche CMS Personnalisez les panneaux de tableau de bord et la marque, masquez les menus et bien plus encore. par les manuels d'utilisation de la vidéo 200K+ ★★★★★★★★★★ 4.7 (114) il y a 5 mois 65
5 Champs personnalisés avancés : étendu Champs personnalisés avancés : étendu Suite d'amélioration tout-en-un qui améliore WordPress et des champs personnalisés avancés. Par Konrad Chmielewski 100K+ ★★★★★★★★★★ 4.8 (132) il y a 1 mois 76
6 Pages imbriquées Pages imbriquées Les pages imbriquées fournissent une interface de glisser-déposer pour gérer les pages et les publications dans le WordPress… par Hook & Filter 90K+ ★★★★★★★★★★ 4.7 (126) il y a 5 jours 83
7 Désactiver le repos API Désactiver le repos API Désactivez l'utilisation du reste API sur votre site Web aux utilisateurs du site. Maintenant, avec le support des rôles d'utilisateur ! par Dave McHale 80K+ ★★★★★★★★★★ 4.8 (38) Il y a 3 ans 37
8 Menus conditionnels Menus conditionnels Ce plugin vous permet de définir des menus conditionnels par publications, pages, catégories, archives… par themifyme 60K+ ★★★★★★★★★★ 4.4 (71) il y a 4 mois 62
9 Ajouter à partir du serveur Ajouter à partir du serveur Add From Server est conçu pour aider à soulager la douleur des mauvais hôtes Web, vous permettant de télécharger… par Dion Hulse 50K+ ★★★★★★★★★★ 4.6 (239) Il y a 6 ans 46
10 Favicon tout en un Favicon tout en un Ajoutez facilement un favicon à votre site et aux pages d'administration WordPress. Compléter avec le téléchargement… de Garrett Grimm 50K+ ★★★★★★★★★★ 4.5 (82) Il y a 3 ans 46

FAQ

PHP Constants Manager: quick answers

Réponses directes, extraites des données en direct WordPress.org.

Source : WordPress.org

Is PHP Constants Manager free?

Yes. PHP Constants Manager is free to download and use from the official WordPress.org plugin directory.

Is PHP Constants Manager safe to use in 2026?

PHP Constants Manager is a solid plugin choice in 2026, with a few things worth checking first. It runs on 10+ sites, is rated 5/5 and was last updated 3 months ago, and scores 63/100 on our health check.

How many websites use PHP Constants Manager?

PHP Constants Manager is active on 10+ WordPress websites and has been downloaded 1,091 times since it launched in June 2025. It was downloaded 99 times in the last 30 days.

Does PHP Constants Manager work with WordPress 7.1?

Yes. The developer has tested PHP Constants Manager up to WordPress 7.1.5, the latest release. It requires WordPress 5.0 or newer.

What PHP version does PHP Constants Manager need?

PHP Constants Manager requires PHP 7.4 or higher. Most hosts run PHP 8.x today, so it works on any modern WordPress hosting.

When was PHP Constants Manager last updated?

The latest version, 1.2.2, was released on August 25, 2026 (3 months ago).

Who makes PHP Constants Manager?

PHP Constants Manager is developed and maintained by cartpauj.

What are the best alternatives to PHP Constants Manager?

The most popular alternatives to PHP Constants Manager are Loginizer (1M+ installs), Redux Framework (800K+ installs) and Admin Menu Editor (300K+ installs).

Propulsé par PageForge

Un modèle et une feuille de calcul. Une vraie page pour chaque recherche.

PageForge transforme chaque ligne d'un CSV en une page WordPress avec son propre titre, URL, SEO et schéma, construit sur la mise en page que vous Déjà conçu. Gratuit sur WordPress.org.

  • CSV et XLSX, plus Google Sheets sur les professionnels et les entreprises
  • Son propre titre, URL, SEO champs et schéma pour chaque page
  • Fonctionne avec l'éditeur de blocs, Elementor, Divi et Avada
  • Gratuit sur WordPress.org, pas de carte de crédit

↑↓ bouger↵ ouvrir