This documentation relates to CiviCRM version 3.1. It's not maintained anymore.
Current version of documentation.

Max Contacts for Import

Skip to end of metadata
Go to start of metadata

This page refers to outdated version of CiviCRM. Check current version of documentation.

Documentation Search

CiviCRM 3.1 Documentation

Support and Participation

Developer Resources

CiviCRM book!

Make sure to check out Understanding CiviCRM as well! You can also support this project by ordering a hard copy.

What is the maximum number of Contacts one can import during a single import cycle? Is there a physical limit? Can one define it someplace?

There is no hard limit in the code on the number of maximum contacts that can be imported. However, there are limits to the filesize that is used as the import source file.

The limit depends on your PHP configuration and/or your CiviCRM version.

For older CiviCRM installations:

The default limit is 1Mb. It can be customized in the file:


by the constant

define( 'CIVICRM_MAX_IMPORT_FILESIZE' , 1048576);

The maximum filesize allowed is 8Mb.

For newer versions (2.0 and higher, possibly lower as well), read on for a more complicated answer.

First, all forms with a file upload are affected by the code in

which sets an html MAX_FILE_SIZE value in the form itself. This is done to prevent file size-related timeouts from PHP, and is calculated by initially setting the limit to 1Mb, and then testing the PHP initialization value of  


So the first simple answer if you're getting size errors is that you'll probably need to edit your PHP ini values: look for the string 'upload_max_filesize', since most php distributes with that set to 4 Mb.

Secondly, some forms (perhaps most?) deliberately limit the MAX SIZE in code to 8Mb. As of 2.0, you can find them with a simple grep:

So, if you need more than 8 Mb, you'll need to edit the relevant line of codeabove. Note that this 8Mb limit is probably sensible for most installations - you should only change it if you know what you're doing and are prepared to live with the consequences (e.g. timeouts that leave your data in an uncertain state.)

  • None

Creative Commons License
Except where otherwise noted, content on this site is licensed under a Creative Commons Attribution-Share Alike 3.0 United States Licence.