31/10/2018 2 Minutes read Tech 

Mix Wordpress and Symfony together

Use Wordpress and Symfony together using a Symfony bundle and a Wordpress plugin.

After our recent post “Drupal and Symfony2. Don’t wait for Drupal8” which allows you to mix Drupal and Symfony, we released today some other tools to mix Symfony and WordPress, the most used blog platform.

Sometimes, you have to add custom logic and WordPress is not really the best tool to do those things so the best way is to do this with a framework and guess what, Symfony is here.

You can now work on Symfony and WordPress together with two components: a Symfony bundle (that can work alone) and an additional WordPress plugin that can be installed if you need to go further.

Moreover, with the new release of WordPress 3.8 “Parker” which is now responsive and support all devices, we now have another good reason to give WordPress some good!


Symfony part: EkinoWordpressBundle

This is the Symfony bundle to deal with your WordPress blog. It will give to Symfony the ability to:

  • Use custom Symfony services into WordPress,
  • Use Symfony to manipulate WordPress database,
  • Create custom Symfony routes out of WordPress,
  • When authenticated on WordPress, authenticated on Symfony too with correct user roles. (requires ekino-wordpress-symfony WordPress plugin),
  • Catch WordPress hooks to be dispatched by Symfony EventDispatcher (requires ekino-wordpress-symfony WordPress plugin).

This bundle (and the installation manual) is available on Github here: https://github.com/ekino/EkinoWordpressBundle

WordPress part: ekino-wordpress-symfony plugin

This is the WordPress plugin that adds functionalities like catch WordPress hooks to be send to Symfony as events via the EventDispatcher component.

WordPress plugin (and the installation manual) is available on Github here: https://github.com/ekino/ekino-wordpress-symfony

Feel free to contribute!

Source code are available on Ekino’s Github account, please feel free to create issues, send us pull requests or help us to improve them in all other ways you can imagine. Also, do not hesitate to contact us if you want more information about them.