Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
Integrating Fuelphp in Wordpress
  • We were tasked to integrate fuelPHP to run in WordPress Website to gain the advantages these two offers to developers. We've been looking for methods over the internet on how to do it and we came tothis site.

    We followed all the instructions, Yes, it successfully installed wordpress but failed to integrate with FuelPHP, when we tried to open fuelphp, it returned an error:

    Fatal error: Cannot redeclare class Fuel\Core\Autoloader in C:\xampp\htdocs\game-bootcamp\fuel\core\classes\autoloader.php on line 24.

    is there somebody there who successfully do it? Can you give us instructions on how to do it?

  • HarroHarro
    Accepted Answer
    Which Fuel version are you on?

    That  example seems to be from before 1.7, current versions don't require the autoloader in the app bootstrap anymore.

    Just use the app/bootstrap that was part of your Fuel install, and only add the line that loads WP:

    require '../wordpress/wp-load.php';

  • Thank you very much for you answer.

    But can you provide complete instructions on how to successfully do it? Our front-end will be WordPress while the back-end is FuelPhp. 
  • I can't help you any further, WordPress is something I wouldn't touch with a 10 foot pole...
  • Hello,
    I know the thread is old, however I was looking for a solution and I couldn't find any so I made it.

    I answered your question on the http://stackoverflow.com/questions/31511332/fuelphp-to-wordpress

    Actually I had the same feeling about wordpress as Harro Verton, however as I went deeper to Wordpress - it's very cool that you can make with it almost everything. Actually I have to do that - client requirements for Wordpress.

    The solution I posted gives you the ability to use Fuel HMVC pattern within wordpress theme/plugin. Fuel will not override Wordpress gettext __ function, so you can use __ for translations and Lang::get for Fuel translations. It is so fast to write Wordpress plugins using Fuel as backend (with the same models in frontend and backend) that it should be merged from start (just joking).

    I hadn't come to any issues yet, if you have any ideas what could be wrong with this integration please post it, so we may discuss it.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion