php.ini Settings Generator
Generate php.ini overrides for production or development: memory and upload limits, error display, session cookie flags, realpath cache and OPcache tuned to your project size.
Free · No sign-up · Your inputs stay in your browser
Input
Generate php.ini settings
Output
php.ini overrides
632 characters
post_max_size must be larger than upload_max_filesize, because the whole request body counts against it; Nginx's client_max_body_size has to allow it too. With validate_timestamps = 0 PHP never checks files for changes, so every deploy must reload PHP-FPM or reset OPcache. Confirm the values took effect with php -i or phpinfo() under FPM, not the CLI, which reads a different ini.
Runs in this browser. Nothing you paste is sent to a server.
About this tool
Method, assumptions, practical next steps, and limits.
The limits that interact
post_max_size must exceed upload_max_filesize because the whole multipart body counts against it, and Nginx's client_max_body_size must allow the same size or the request never reaches PHP. memory_limit applies per request, so multiply by PHP-FPM's max_children to see the worst case. The php.ini directive list documents each setting.
OPcache in production
With opcache.validate_timestamps=0, PHP never checks whether a file changed, which saves a stat call per included file on every request. It also means a deploy must reload PHP-FPM, or new code is never seen. max_accelerated_files should exceed the number of PHP files including vendor.