To much data: Max Input Vars Issue

You are here:

If you’re building a map with lots of entries for regions/countries or markers, you might come across the error message saying the ‘Map has too many entries’ or a PHP error mentioning the ‘max_input_vars’ limit. The plugin might alert you when this will happen, to prevent data being lost.

To much data: Max Input Vars Issue

The PHP variable “max_input_vars” was introduced in PHP 5.3.9+ as a security measure to limit the maximum amount of POST variables submitted, by default this limit is set to 1000. The map is built inside the WordPress Custom Post Type interface, which already includes a few hidden fields to control things like the publish date, publish status, author, and other types of information. The map itself can have lots of information fields, specially if you have a lot of regions and markers. If you’re building a large map there’s a chance the number of data entries sent to be saved exceeds the default 1000.

The solution might not be the same for everyone, it will depend on your hosting also. Below we’ll cover the most popular solutions.

.htaccess Solution

Create or update your .htaccess file and add the following line:

php_value max_input_vars 3000

Your hosting provider may not allow this to be overridden, if this doesn’t work then try one of the following options or check with your provider.

Edit your php.ini file

If you have access to your servers php.ini file (via cPanel or any other options panel, using the file browsing interface) you can open it and change the value manually. You should check if that line already exists or add it:

max_input_vars = 3000

You can check in your hosting provided knowledge base if they allow you to modify this file and how to access it.

Posted by Carlos Moreira

Lead developer of Interactive Geo Maps plugin.