PHP accepts at most 1,000 input variables per request by default. A large form, a long WordPress menu, a WooCommerce product with many variations, or a theme options page can send more. PHP then silently drops the rest, so changes seem to save but part of them is lost.
Before you start
- Look for this warning in the PHP error log:
PHP Warning: Unknown: Input variables exceeded 1000. To increase the limit change max_input_vars in php.ini. - If there is no warning, the symptom alone (menu items vanishing after save) is a strong hint.
Raise it on cPanel
- Open cPanel → Software → Select PHP Version → Options (CloudLinux), or MultiPHP INI Editor.
- Set
max_input_varsto5000, or10000for very large menus. - Save, then repeat the action that failed.
See PHP version and options in cPanel.
Raise it with .user.ini
Where the panel does not offer the option, create .user.ini in the site's document root:
max_input_vars = 5000PHP reads it within about 5 minutes (user_ini.cache_ttl). With mod_php, use php_value max_input_vars 5000 in .htaccess instead.
Raise it on a VPS
Edit the PHP-FPM php.ini for your version, for example /etc/php/8.3/fpm/php.ini:
max_input_vars = 5000sudo systemctl restart php8.3-fpmIf you use a per-site pool, set php_admin_value[max_input_vars] = 5000 in that pool file instead.
Check that the change applied
Create a temporary phpinfo() page, check that the Local Value of max_input_vars shows the new number, then delete the page. In WordPress, Tools → Site Health → Info → Server also shows it.
Still losing data?
- Suhosin, an old security extension, has its own
suhosin.post.max_varsandsuhosin.request.max_varslimits. - Large posts can also hit
post_max_size. Related limits are covered in fix upload size limit errors and increase WordPress PHP limits. - A web application firewall rule can block very large requests. Check the ModSecurity or Imunify360 logs.
FAQ
What value should I use?
3000–5000 covers most sites. Use 10000 for very large menus or product variation pages. Avoid setting it extremely high, because the limit protects against hash-collision attacks.
Why do my WordPress menu items disappear after saving?
Each menu item sends about 10–12 fields, so a menu with around 90 items exceeds 1,000 variables. Raise max_input_vars and save the menu again.
Does max_input_vars apply to JSON or REST requests?
No. It only limits parsed form data (GET, POST and cookies). A JSON body is read as one raw input.
