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.
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.
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.
Disable some features
If you’re not able to perform any of the changes mentioned above and your hosting provider is not able to help, you can disable some features in the settings to lower the number of
input vars that the edit screen uses.
You can disable features that you don’t need for your maps. Go to Settings > Map Features > Map Tabs & Features
Divide the map entries into different maps
Another workaround would be to divide the entries in your map into different maps. For example, if you have a lot of regions entries, you can create multiple maps, each with a different set of entries. Then use a base map and overlay all your maps, to display all regions in the same map. You can do the same with markers or separate your regions map from your markers map. The important thing is not to reach the limit of
input vars used. You can check the ‘Min Requirements‘ panel to have an idea of what is the current limit and how much of it you used.