Running WordPress on Caddy – Solving my problems.

To run wordpress on Caddy, you need a Caddyfile like this: tls root * /usr/local/www/wordpress php_fastcgi # Prevent malicious PHP uploads from running @uploads { path_regexp path /uploads\/(.*)\.php } rewrite @uploads / @wp-admin { path not ^\/wp-admin/* } rewrite @wp-admin {path}/index.php?{query} file_server

Then you need to set your permissions right.

sudo chown -R www-data:www-data

as a baseline.

Leave a Reply