Fix: The file size exceeded the maximum size permitted by your PHP configuration

Fix: The file size exceeded the maximum size permitted by your PHP configuration

You might have encountered this error while uploading database using phpmyadmin dashboard. The default size is 2MB in php.ini for “upload_max_filesize“. Change the value of upload max filesize to your desired size say 20MB. And also need to change post_max_sizeif you have changed upload_max_filesize greater or equal to upload max filesize.  post_max_size must be greater or equal to upload_max_filesize.

If you are ubuntu user then first locate your php.ini. Use bash  command “locate php.ini” to locate the location of php.ini of your php version. You might have multiple php.ini for different version of php. Change the php.ini of the php version you are using. Then change the below terms as your requirement.

;Maximum allowed size for uploaded files.
upload_max_filesize = 20M
; Must be greater than or equal to upload_max_filesize
post_max_size = 20M

Note: Don’t forget to restart your apache server.


sudo service apache2 restart

Leave a Reply

Your email address will not be published. Required fields are marked *