Integrate symfony wordpress

Asked

Viewed 30 times

1

I’m trying to Integrate a Symfony 4.3 PHP app in Wordpress, By integrating I Mean that the Symfony page call the get_header() and get_footer()

So I Managed this by putting

   require dirname(__DIR__) . '../../wp-load.php';

in my config/bootstrap.php, and then call the Wordpress functions in my controller’s code. This worked fine in the staging site, but when I got to Production I got a Conflict with wp Rocket. I Believe this will happen in the Future with other plugins or other core updates.

Fatal error: Cannot declare interface Psr\Container\ContainerInterface, because the name is already in use in /home/avporg/public_html/wp-content/plugins/wp-rocket/vendor/psr/container/src/ContainerInterface.php on line 11

How can I correct this error?

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.