PHPackages                             mukadi/wordpress-bundle - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Database &amp; ORM](/categories/database)
4. /
5. mukadi/wordpress-bundle

ActiveSymfony-bundle[Database &amp; ORM](/categories/database)

mukadi/wordpress-bundle
=======================

Integrate wordpress and symfony in the same application

2.0.1(6y ago)212.8k10[4 issues](https://github.com/mbo2olivier/mukadi-wordpress-bundle/issues)1MITPHPPHP ^7.1.3

Since May 10Pushed 6y ago3 watchersCompare

[ Source](https://github.com/mbo2olivier/mukadi-wordpress-bundle)[ Packagist](https://packagist.org/packages/mukadi/wordpress-bundle)[ RSS](/packages/mukadi-wordpress-bundle/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependencies (12)Versions (19)Used By (1)

MukadiWordpressBundle
=====================

[](#mukadiwordpressbundle)

This is a fork of [EkinoWordpressbundle](https://github.com/ekino/EkinoWordpressBundle), this bundle adapt EkinoWordpressBundle to symfony &gt;= 4 new architecture and features. Some features has been removed (such as automatic symfony authentication when authenticated in Wordpress...) and will be reintegrated as separated bundle to install if needed.

Here are some retained features:

- Use custom Symfony services into Wordpress (note: only public services),
- Use Symfony to manipulate Wordpress database,
- Create custom Symfony routes out of Wordpress,
- Dispatch Event from Wordpress into Symfony \*(require mukadi-symfony-bridge Wordpress plugin)

---

Installation
------------

[](#installation)

Before install the bundle, edit your composer.json file and specify the following options:

```
"extra": {
    ...
    "symfony": {
        ...
        "allow-contrib": "true" # allow symfony flex to install recipe (if your are using symfony flex)
    }
    ...
    # set installation path for wordpress themes and plugins
    "installer-paths": {
        "public/mu-plugins/{$name}": ["type:wordpress-muplugin"],
        "public/plugins/{$name}": ["type:wordpress-plugin"],
        "public/themes/{$name}": ["type:wordpress-theme"]
    },
    # install wordpress in a public sub-directory
    "wordpress-install-dir": "public/wp"
},
```

Run `php composer.phar require mukadi/wordpress-bundle` and let Symfony Flex configure the bundle.

Bundle configuration
--------------------

[](#bundle-configuration)

If your are not using symfony flex, you have to configure manually your bundle, here is the minimal bundle configuration:

```
mukadi_wordpress:
    table_prefix: "%env(WP_PREFIX)%"
    wordpress_directory: '%kernel.project_dir%/public/%env(WP_DIR)%'
```

Add a public/wp-config.php file
-------------------------------

[](#add-a-publicwp-configphp-file)

Put the following content in your public/wp-config.php file :

```
declare(strict_types=1);

require_once __DIR__.'/../vendor/autoload.php';

$config = new \Mukadi\WordpressBundle\Config(
    realpath(__DIR__)
);

// define('WP_ALLOW_MULTISITE', env('WP_ALLOW_MULTISITE', true));

$table_prefix = env('WP_PREFIX', 'wp_');

/* That's all, stop editing! Happy blogging. */
$config->apply();
/** Sets up WordPress vars and included files. */
require_once(ABSPATH . 'wp-settings.php');
```

Update the public/index.php file
--------------------------------

[](#update-the-publicindexphp-file)

If you don't make modifications in your public/index.php file you can just copy the content of the generated 'sf-wp-bootstrap.php' (see the code below) into your index.php file, otherwise update your index.php accordingly to that file.

Here's what your index.php file should look like:

```
use App\Kernel;
use Symfony\Component\ErrorHandler\Debug;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\Dotenv\Dotenv;

require dirname(__DIR__).'/config/bootstrap.php';

function run(){
    if ($_SERVER['APP_DEBUG']) {
        umask(0000);

        Debug::enable();
    }

    # setup WP_DEBUG
    $env = $_SERVER['APP_ENV'] ?? 'dev';
    $debug = (bool) ($_SERVER['APP_DEBUG'] ?? ('prod' !== $env));
    define('WP_DEBUG', $debug);
    if ($trustedProxies = $_SERVER['TRUSTED_PROXIES'] ?? $_ENV['TRUSTED_PROXIES'] ?? false) {
        Request::setTrustedProxies(explode(',', $trustedProxies), Request::HEADER_X_FORWARDED_ALL ^ Request::HEADER_X_FORWARDED_HOST);
    }

    if ($trustedHosts = $_SERVER['TRUSTED_HOSTS'] ?? $_ENV['TRUSTED_HOSTS'] ?? false) {
        Request::setTrustedHosts([$trustedHosts]);
    }

    $kernel = new Kernel($_SERVER['APP_ENV'], (bool) $_SERVER['APP_DEBUG']);
    # inject SF container in WP
    $GLOBALS['sf'] = function ($id) use (&$kernel) {
        return $kernel->getContainer()->get($id);
    };
    $request = Request::createFromGlobals();
    $response = $kernel->handle($request);
    $response->send();
    $kernel->terminate($request, $response);
}
run();
```

Add Wordpress routing into symfony
----------------------------------

[](#add-wordpress-routing-into-symfony)

Add the WordpressBundle routing file in your `config/routes.yaml`, after your custom routes to catch all Wordpress routes:

```
...
mukadi_wordpress:
    resource: "@MukadiWordpressBundle/Resources/config/routing.xml"
```

Install Wordpress Plugins via Composer
--------------------------------------

[](#install-wordpress-plugins-via-composer)

Edit your composer.json file to add a custom repository:

```
...
"repositories": [
    {
        "type": "composer",
        "url": "https://wpackagist.org"
    }
]
```

Now you can install wordpress plugins, just run `php composer.phar require wpackagist-plugin/`.

Avoid Doctrine remove custom Wordpress tables
---------------------------------------------

[](#avoid-doctrine-remove-custom-wordpress-tables)

When you install plugins in Wordpress, plugin can create custom tables to store specific data. By default such tables will be removed by the `doctrine:migrations:diff` command. You must configure doctrine/dbal to ignore those tables, just have to add the following configuration option to your doctrine configuration:

```
...
doctrine:
    dbal:
        schema_filter: '~^(?!%env(WP_PREFIX)%)~'
```

Manipulate Wordpress database in Symfony
----------------------------------------

[](#manipulate-wordpress-database-in-symfony)

You can call Wordpress table managers in Symfony by calling the following services:

*Service identifier**Type*mukadi\_wordpress.manager.commentWordpress comment managermukadi\_wordpress.manager.comment\_metaWordpress comment metas managermukadi\_wordpress.manager.linkWordpress link managermukadi\_wordpress.manager.optionWordpress option managermukadi\_wordpress.manager.postWordpress post managermukadi\_wordpress.manager.post\_metaWordpress post metas managermukadi\_wordpress.manager.termWordpress term managermukadi\_wordpress.manager.term\_relationshipsWordpress term relationships managermukadi\_wordpress.manager.term\_taxonomyWordpress taxonomy managermukadi\_wordpress.manager.userWordpress user managermukadi\_wordpress.manager.user\_metaWordpress user metas managerAll of this services extends the `Mukadi\Doctrine\CRUD\CRUD` class, so see the [documentation](https://github.com/mbo2olivier/mukadi-doctrine-crud) to know how to deal with it.

###  Health Score

35

—

LowBetter than 79% of packages

Maintenance16

Infrequent updates — may be unmaintained

Popularity28

Limited adoption so far

Community18

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor1

Top contributor holds 94.3% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~35 days

Recently: every ~0 days

Total

18

Last Release

2333d ago

Major Versions

1.2.0 → 2.0.0-RC12019-12-24

PHP version history (2 changes)1.0.0PHP ^7.0

1.0.2PHP ^7.1.3

### Community

Maintainers

![](https://www.gravatar.com/avatar/cb5cdf4f6d6a5543e3ed7b1aa8502d4a5417107234cbde18e53f69e511c5dc02?d=identicon)[mbo2olivier](/maintainers/mbo2olivier)

---

Top Contributors

[![mbo2olivier](https://avatars.githubusercontent.com/u/6231735?v=4)](https://github.com/mbo2olivier "mbo2olivier (33 commits)")[![wieger](https://avatars.githubusercontent.com/u/365361?v=4)](https://github.com/wieger "wieger (1 commits)")[![zfmaster](https://avatars.githubusercontent.com/u/10129233?v=4)](https://github.com/zfmaster "zfmaster (1 commits)")

---

Tags

doctrinemanipulate-wordpress-databasewordpresswordpress-routes

### Embed Badge

![Health badge](/badges/mukadi-wordpress-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/mukadi-wordpress-bundle/health.svg)](https://phpackages.com/packages/mukadi-wordpress-bundle)
```

###  Alternatives

[prestashop/prestashop

PrestaShop is an Open Source e-commerce platform, committed to providing the best shopping cart experience for both merchants and customers.

9.0k15.4k](/packages/prestashop-prestashop)[kimai/kimai

Kimai - Time Tracking

4.6k7.4k1](/packages/kimai-kimai)[hautelook/alice-bundle

Symfony bundle to manage fixtures with Alice and Faker.

19519.4M34](/packages/hautelook-alice-bundle)[ec-cube/ec-cube

EC-CUBE EC open platform.

78527.0k1](/packages/ec-cube-ec-cube)[rcsofttech/audit-trail-bundle

Enterprise-grade, high-performance Symfony audit trail bundle. Automatically track Doctrine entity changes with split-phase architecture, multiple transports (HTTP, Queue, Doctrine), and sensitive data masking.

1022.4k](/packages/rcsofttech-audit-trail-bundle)[ahmed-bhs/doctrine-doctor

Runtime analysis tool for Doctrine ORM integrated into Symfony Web Profiler. Unlike static linters, it analyzes actual query execution at runtime to detect performance bottlenecks, security vulnerabilities, and best practice violations during development with real execution context and data.

813.1k](/packages/ahmed-bhs-doctrine-doctor)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
