dunglas / frankenphp-wordpress

WordPress on FrankenPHP
122 stars 18 forks source link

Is it possible to run WordPress in worker mode? #10

Open nickchomey opened 1 year ago

nickchomey commented 1 year ago

It appears that this doesn't use Frankenphp's worker mode. If that's the case, what would be the use-case/advantage of running WordPress within frankenphp? Just that we'd be able to use it within the broader frankenphp framework to take advantage of Caddy, easy container deployment, use Mercure for websockets, perhaps develop/use other Go tools/services in the background, etc?

Also, if this is indeed this case, is at at least technically possible to run WordPress in Worker mode, but just needs some work to implement? If so, I'd be happy to contribute to that if some guidance can be provided.

nickchomey commented 1 year ago

As I explore some more, this seems like something that won't be possible. It has nothing to do with frankenphp, but rather is due to WordPress just not supporting any sort of request-response model.

Here's an unmaintained effort at modifying wp core to allow for this, and is also associated with a repo for using it with swoole.

https://github.com/WordPress-PSR/request-handler

It seems that this is where any collective effort should be focused to make wp compatible with any of these modern async servers.