Fluent configuration management for WordPress
https://roots.io/bedrock/ โ// momentum
// why it's here
- Active: last commit today
- Built almost entirely by one person
- Around since 2018 and still shipping
- Accepts sponsorship (github)
// how to help
// readme
wp-config
Fluent configuration management for WordPress
$config = Config::make($rootDir)->bootstrapEnv();
$config
->env('WP_ENV', 'production')
->env('WP_HOME')
->set('WP_DEBUG', true)
->when($config->get('WP_ENV') === 'development', function($config) {
$config
->set('SAVEQUERIES', true)
->set('SCRIPT_DEBUG', true);
})
->apply();
- Fluent API for clean, chainable configuration
- Built-in environment variable loading via
vlucas/phpdotenv - Conditional configuration with
when() - Instance-scoped hook system for extensible configuration
Support us
Roots is an independent open source org, supported only by developers like you. Your sponsorship funds WP Packages and the entire Roots ecosystem, and keeps them independent. Support us by purchasing Radicle or sponsoring us on GitHub โ sponsors get access to our private Discord.
Requirements
- PHP >= 8.1
- Composer
Installation
composer require roots/wp-config:^2.0