A lot of the fixes on this blog end with a line in wp-config.php: FS_METHOD when WordPress asks for FTP credentials, a higher memory limit, debug logging to a file. This generator puts those constants in one place, each with a one-line explanation and a warning where it can lock you out.
Tick what you need and copy the lines into your existing file, or get a complete wp-config.php for a new install with fresh keys and salts. The second tab works out the PHP upload limits (for the media library or phpMyAdmin imports) for your type of server.
Each setting is a WordPress constant, checked against the WordPress 7.1 source. It all runs in your browser: nothing you type is sent anywhere, and the keys come from your browser’s crypto.getRandomValues().
Limits: it writes the lines, it can’t see your server. A wrong address or HTTPS setting can lock you out of wp-admin, so keep a copy of your current wp-config.php and remove the new lines if the site stops loading.
Your lines
The cron job
Add it in cPanel → Cron Jobs, or with crontab -e on a server. It calls wp-cron.php every 5 minutes.
Before you save
Pick the size you need and how your site runs PHP, and get the lines for the right file. WordPress doesn’t set the upload limit itself: PHP does, and on Nginx the web server too.
Limits: a host can lock these values, and then no file you edit changes them. The tool can’t see your server, so check the result where the last step says.
Your settings
How the limits fit together
upload_max_filesizeis the largest single file.post_max_sizeis the whole request, which carries the file plus the form fields, so it must be larger: in my test a file of exactly 8M was refused with both set to 8M and accepted oncepost_max_sizewas 16M. WordPress shows the smaller of the two as “Maximum upload file size”.memory_limit: the PHP manual says it should generally be larger thanpost_max_size. In my test a 100MB upload still went through withmemory_limitat 16M, because PHP writes uploads to a temporary file, so think of it as room for what runs afterwards: WordPress resizing a large photo, unzipping a theme.max_input_timelimits how long PHP spends reading the request (the upload itself); at its default of-1it usesmax_execution_time.max_execution_timelimits the script that runs afterwards. On Linux it counts the script’s own CPU time, not time spent waiting. The web server has its own timeouts on top.- All five can only be raised in a file PHP reads before the script starts.
upload_max_filesize,post_max_sizeandmax_input_timeare “PHP_INI_PERDIR”, soini_set()inwp-config.phporfunctions.phpreturns false and changes nothing.
What doesn’t work
@ini_set( 'upload_max_filesize', '64M' );inwp-config.phporfunctions.php: PHP ignores it at runtime. I checked on PHP 8.6:ini_set()returned false and the value stayed the same. (memory_limitandmax_execution_timeare the exceptions: those two can change at runtime.)php_valuelines in.htaccesswhen PHP doesn’t run as an Apache module: Apache answers every request with “500 Internal Server Error” (Invalid command 'php_value'in its error log). The<IfModule mod_php.c>wrapper avoids the error, but then the lines do nothing.- Plugins or snippets that only filter
upload_size_limit: the uploader shows a bigger number, but PHP still refuses the file. - Editing the php.ini that
php --inishows: that’s the command-line PHP. The web server reads a different one.
How I tested it
On a WordPress 7.1.5 test site, I pasted each output into a real wp-config.php and checked that WordPress actually used the value: 32 of 32 checks passed. A few things worth knowing from the tests:
- New keys and salts log everyone out (the old login cookie was rejected), but passwords keep working.
- Passwords with quotes, backslashes and other special characters come out escaped, and PHP read them back exactly as typed.
WP_MEMORY_LIMITonly raises the limit. Setting it below the server’s value does nothing.- With
post_max_sizeequal toupload_max_filesize, a file of exactly that size is refused, so the upload tab always setspost_max_sizea bit higher.
Limitations
- The
.user.iniandphp.inioutputs were tested on Apache with PHP-FPM. The mod_php.htaccessand Nginx outputs, and the cPanel and hPanel steps, follow the official docs but weren’t run on those servers.