Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PHP configuration #16

Closed
jasonmarlin opened this issue Jun 19, 2014 · 6 comments
Closed

PHP configuration #16

jasonmarlin opened this issue Jun 19, 2014 · 6 comments
Labels

Comments

@jasonmarlin
Copy link

This project is amazing and so nice to use. However, one issue I ran into was with the default PHP upload/POST limit being too small to upload media files of any substantial size. I added a couple of lines to the PHP template to fix it, but it could also be useful to allow this setting in the group_vars.

I added the following to roles/wordpress-sites/templates/php-fpm.conf.j2

php_value[memory_limit] = 96M
php_value[max_execution_time] = 120
php_value[max_input_time] = 300
php_value[php_post_max_size] = 25M
php_value[upload_max_filesize] = 25M

To allow unlimited uploads through Nginx, I added client_max_body_size to roles/nginx/templates/wordpress.conf.j2

location ~ \.php$ {
  try_files $uri =404;
  include fastcgi_params;
  fastcgi_pass unix:/var/run/php5-fpm-$site_name.sock;
  client_max_body_size 0;
}

Some of these values may be unnecessary.

Thanks,
Jason

@swalkinshaw swalkinshaw changed the title Add upload params to php config PHP configuration Aug 28, 2014
@swalkinshaw
Copy link
Member

Just hijacking this issue as a general feature request for proper PHP config management via a template and variables.

This was referenced Aug 29, 2014
@swalkinshaw
Copy link
Member

Mostly taken care of by #44

@nathanielks
Copy link
Contributor

Just realized I didn't actually address file size. Shall I submit another pull? What would be a good default upload size be?

@nathanielks
Copy link
Contributor

Actually, I could just implement what @jasonmarlin initially recommended.

@swalkinshaw
Copy link
Member

Those defaults are probably fine. We should probably all those variables as they're fairly common.

@nathanielks
Copy link
Contributor

#77

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants