
1. “The uploaded file exceeds the upload_max_filesize directive in php.ini”
“The uploaded file exceeds the upload_max_filesize directive in php.ini.”
means that the file you’re trying to upload is larger than the maximum file size allowed by your server’s PHP configuration.
Why This Happens
PHP has a setting called upload_max_filesize in its php.ini configuration file. If you try to upload a file bigger than that limit (e.g. a large image, video, plugin, or theme), WordPress will block the upload and show this error.
How to Fix It
There are several ways to increase the upload limit depending on your hosting setup:
1. Edit php.ini File (if available)
If you have access to the server’s php.ini file, update these values:
upload_max_filesize = 64M
post_max_size = 64M
max_execution_time = 300
2. Modify .htaccess File (for Apache servers)
Add the following lines to the .htaccess file in your WordPress root directory:
php_value upload_max_filesize 64M
php_value post_max_size 64M
php_value max_execution_time 300
php_value max_input_time 300
Use a WordPress Plugin
If you’re not comfortable editing code, you can use a plugin to increase the limit:
- WP Increase Upload Filesize
- Upload Max File Size
These plugins let you change the maximum upload size from the WordPress admin panel.
3. Ask Your Hosting Provider
If none of the above methods work, your host may have strict limits. Contact their support and ask them to increase:
upload_max_filesizepost_max_sizemax_execution_time
To check if your changes worked, go to:
WordPress Admin → Media → Add New
You should see the new max upload limit displayed on the page
Follow video below