How do I configure the PHP memory limit?

Due to the number of fields that are sometimes present in the admin, it may be necessary to adjust the PHP max_input_vars value. The default of 1,000 fields can be too small when managing a product that contains hundereds of variants. This limit is quickly reached when considering how many fields each variant has.

Data will be truncated by the server

A form that contains more fields than PHP is configured to accept will result in lost or corrupted data.

The max_input_vars value is defined in the php.ini file. On a Linux server, this is typically located:

# PHP 7.3

# PHP 7.4

# PHP 8.0

On macOS when using Homebrew:

# PHP 7.3

# PHP 7.4

# PHP 8.0

We recommend a value of 10,000. You should either search for the existing entry, or add to the bottom of the file:


Once set, you'll need to reload PHP-fpm.

# Linux (PHP 7.3)
sudo service php7.3-fpm reload

# Linux (PHP 7.4)
sudo service php7.4-fpm reload

# Linux (PHP 8.0)
sudo service php8.0-fpm reload

# macOS (Laravel Valet)
valet restart

Articles in this section

Was this article helpful?
0 out of 0 found this helpful