When saving large custom layouts, not all data is saved. How do I fix this?
Have you been editing a page with a custom layout, and noticed that when your layout becomes very large, not all of the data is saved? The first time this happens to you, it can be extremely frustrating and seemingly random or without reason. But don't worry, there's a logical explanation and a pretty easy fix.
If you're using PHP 5.3.9+ on your server (which I would hope many of you are), there is a directive in the configuration called
max_input_vars with a default value of
1000. This directive limits the input fields sent with any form submission through PHP on your server. In other words, by default on your server, if you submit a form with more than 1,000 fields, all extra form fields will be dropped.
How to Confirm
If you'd like to confirm for sure this is your issue, you can install and activate the plugin called WP Max Submit Protect.
With this plugin active, clicking "Update" from your Edit Page screen will give you an alert if you're submitting more than your server's allowed form fields.
How to Fix
To fix this issue, you just need to increase your
max_input_vars directive to something higher like
3000. Generally, you can do this from your hosting account by editing your php.ini file.
There are also other methods described in the following article from WooCommerce:
And if this feels a bit over your head, don't worry. You can always contact your web host and simply ask them to adjust your
max_input_vars PHP directive to something higher like
3000. Any reputable web host should be able to quickly help you to do this.