If you see a warning about your “Max Input Vars” in your Site Status screen, do not worry.  This article will guide you on what this means and how to fix this issue.

What is Max Input Vars?

Max Input vars is a server setting which controls the number of individual input variables (input vars) are supported when saving data on your website.  This can affect using the OptimizePress editor if you are building a long page or a page with many elements, as the server may not be able to manage all of these separate variables and will therefore fail to save the page, or only save part of the page.

This is a setting that is controlled by your hosting/server, and not controlled by OptimizePress.

How to  Increase the max_input_vars of your site

The recommended minimum max_input_vars in the php.ini setting is 3000 – this is usually set to around 1000. If you are having issues in saving the content, please check your max_input_vars is set to the recommended value.

If your max input vars is already set to 3000 and you are still having issues with saving your content, we have heard in few occasions where certain hosts, pages with long content stop rendering or saving content after some point. We found out this is due to a limitation in the PHP setup for the site which is set to only save a certain number of variables on a page. Once the limit is exceeded, content is no longer saved – this is not a setting or limitation within OptimizePress 3.0.

We have found a workaround to solve this issue by increasing the max_input_vars to 10000. You can contact your hosting company and ask them to increase your max input vars.

Or you may do the following (this should only be done once per site and if you are not sure to implement this, it would be better to ask help from your hosting company) –

1. In your  php.ini file you need to change the setting for the max_input_vars variable. You need to change it to be 10000:

max_input_vars = 10000

This should ensure that all variables or content is saved to the database rather than only 1000 variables being passed through.

2. If updating through php.ini file doesn’t work, then you can try creating a .user.ini file in the same directory as your wp-config.php file and add the same variable:

max_input_vars = 10000

IMPORTANT NOTE: Some hosting companies can’t reach 10000 so please ask them their limits beforehand. If they can’t reach 10000, ask them to go for max_input_vars = 9999 instead (see more about this at the bottom of this page).

If you are still having issues after doing these suggested troubleshooting steps, please submit a ticket to our support helpdesk so our Support team can check this issue in your site.