dunglas / frankenphp-wordpress

WordPress on FrankenPHP
117 stars 17 forks source link

Can't update/install plugins - Run frankenphp as user www-data #17

Closed AndreiTelteu closed 6 months ago

AndreiTelteu commented 6 months ago

I tried this docker template and I noticed that wordpress cannot update itself or plugins/themes because of directory ownershsip issues. Everything is owned by www-data but frankenphp runs as root. I modified the dockerfile to run franken as www-data and it works now. I also had to change the owner of /data/caddy. Is there any other folder I need to change the owner of ? Do you know any better way to do this ?

dunglas commented 6 months ago

You should be able to run as non-root without using su: https://frankenphp.dev/docs/docker/#running-as-a-non-root-user

AndreiTelteu commented 6 months ago

@dunglas Thanks. Reverted back and switched to this method.

dunglas commented 6 months ago

Thank you!