How to fix the uploaded file exceeds the maximum upload file size upload_max_filesize directive in php.ini
You may have noticed this error at least once if you have used WordPress ( uploaded file exceeds the upload_max_filesize directive in php.ini). How to Increase Maximum Upload File Size in WordPress
You may have noticed this error at least once if you have used WordPress ( uploaded file exceeds the upload_max_filesize directive in php.ini). When installing a theme, plugin or uploading an image or file, you may get this message on your screen. It has nothing to do with the theme or plugin. The problem is with your server settings which limit the maximum size for uploaded files.
It's a common error and it can be easily fixed. This error message is an indication of that the file you are trying to upload is larger than your web host allows (WordPress default file upload size is 2 MB).
The uploaded file exceeds the upload_max_filesize directive in php.ini
The solution is easy, you need to increase the file size upload limit. You can do it yourself or ask your web host support team to increase the file size limit.
Way to fix it:
Editing Your .htaccess file
If the above editing PHP.ini file doesn't work for you, then you can edit your .htaccess file to fix this issue.
Follow these steps to edit your .htaccess file
A. Log in to your web hosting account and go to cPanel
B. Click on FILES -> File Manager
C. Select Document Root for: from the Directory Selection and click on Go. (Make sure the checkbox for Show Hidden Files is checked) or find the directory where you have installed the website.
D. find the .htaccess file.
E. Open the .htaccess file and or edit the following code at the bottom.
php_value upload_max_filesize 64M php_value post_max_size 64M php_value memory_limit 400M php_value max_execution_time 180 php_value max_input_time 180
F. Save the changes you made to the .htaccess file
Note: if you can't find the .htaccess file in your root directory, create a file and name it .htaccess