When migrating large sites you end up with a big .sql file of WordPress data that needs to be imported on your WordPress database. The size of the file may exceed the limits you have predefined in your phpmyadmin, specially since many internet hosting providers set as default values very restrictive limits ( the quickest way to get an idea of what your limits are is to check the “Max” number in the import tab of phpmyadmin, see the figure below).
If so, you can easily increase the maximum allowed file size by modifying the php.ini file in your server ( the location of the file may change depending on your server configuration, check for instance in /etc/php.ini ). There are three important parameters in php.ini that can be used to control the size and memory limits of an import process:
– upload_max_filesize: maximum size of the file/s to import
– post_max_size : maximum size of the POST data that PHP will accept and send to the webserver
– memory_limit : maximum memory the php engine can consume to process the import
Generally speaking, memory_limit > post_max_size > upload_max_filesize (i.e. the POST size must be larger than the size of the file to be imported since the full content of the file will need to be sent as POST data to the server; similarly, we need enough memory to be able to handle all this data).