wp-admin-bundle) provides a lightweight Symfony bundle to integrate WordPress functionality (e.g., admin UI, REST API, or database access) into a Symfony application. This is useful for headless WordPress setups, hybrid CMS applications, or legacy WordPress migrations to Symfony.wp-admin hooks, database schema) could lead to maintenance overhead if WordPress updates break compatibility.wp-config.php paths, tables, and credentials.wp-admin routes. May need custom middleware or API wrappers.symfony/http-kernel), but this adds complexity.wp-config.php paths./wp subdirectory or /var/www/html).composer.json includes:
"require": {
"djvue/wp-admin-bundle": "^1.0"
}
bundles.php to register the bundle:
return [
// ...
DjVue\WpAdminBundle\DjVueWpAdminBundle::class => ['all' => true],
];
config/packages/wp_admin.yaml (if provided) or environment variables:
djvue_wp_admin:
wp_root: '%env(WP_ROOT)%' # e.g., "/var/www/html/wp"
db_host: '%env(DB_HOST)%'
db_name: '%env(DB_NAME)%'
wp-config.php is accessible from Symfony’s runtime./wp-admin/*. Override or prefix carefully to avoid conflicts:
# config/routes.yaml
djvue_wp_admin:
resource: "@DjVueWpAdminBundle/Resources/config/routing.yml"
prefix: "/admin/wp" # Custom prefix to avoid clashes
// src/Kernel.php
protected function build(RequestContext $requestContext)
{
$requestContext->fromRequest($this->getRequest());
// Ensure Symfony's auth system doesn’t conflict with WP's
}
wp-admin hooks not exposed by the bundle./wp-admin/post.php).wp-admin-bundle makes migration to alternatives costly.WP_Debug vs. Symfony’s profiler).wp_sessions) may break in clustered setups.How can I help you explore Laravel packages today?