While using WordPress or other PHP script for uploading file, sometime we get error message in the page screen. This is happens while we are uploading large files to the server and it exceed the limit of allowable size for uploading. We can solve this problem by using the PHP configuration ini.
Checking the PHP Upload Limit
By default PHP set to maximum 2M upload file size. We can use PHP function to check the current upload size using the ini_get() or by using the phpinfo() function.
echo ini_get('upload_max_filesize'); phpinfo();
Increase the PHP Upload Limit
To increase the maximum upload file size, open your
php.ini file in the
"xampp/php/php.ini" directory. Find and replace the size to your need as example below.
; Maximum allowed size for uploaded files. ; http://php.net/upload-max-filesize upload_max_filesize = 64M
Save the changes and restart your Apache server.