Simple fix if custom fields in WordPress are not saving

I wanted to share the resolution of an issue I encountered with custom fields not saving in WordPress this past week.  The problem would occur with fields from the Advanced Custom Fields plugin and only if they were new fields being added. Existing custom fields on the page were not affected.

I found out the cause after checking a few forum posts. Essentially there were so many fields on the page WordPress could not handle that amount being submitted to the database at one time. Digging a little deeper, each field is tied to a variable. The limit had been reached for the number of variables that could be managed by PHP on a page load.  This limit can be increased in either the php.ini file or in the .htaccess file. I chose to edit the .htaccess file in the root folder since I couldn’t edit php.ini. This line of code was added to the bottom of .htaccess: php_value max_input_vars 3000. It will take a few minutes for your server to register the changes.

For those who experienced a similar issue, try my above solution first before deactivating plugins and go through hours of troubleshooting.

Matthew Dailey

Web developer, photographer, and Photoshop user.