Quick Takeaway
Fix WordPress upload max filesize exceeded error by modifying php.ini settings: increase upload_max_filesize and post_max_size to 64M, set max_execution_time to 300, and restart your server to apply changes.
The fix wordpress upload max filesize exceeded error is one of the most frustrating issues WordPress users encounter when trying to upload media files, themes, or plugins. This error occurs when your file exceeds the maximum upload size limit set by your server configuration, preventing you from adding essential content to your website.
Understanding the WordPress Upload Max Filesize Error
When you encounter the “upload_max_filesize exceeded” error, WordPress is essentially telling you that the file you’re trying to upload is larger than what your server allows. This limitation is controlled by several PHP settings on your hosting server, including upload_max_filesize, post_max_size, and max_execution_time.
The error typically appears when uploading:
- Large image files or media content
- WordPress themes and plugins
- Backup files for site restoration
- Video files for your media library
Common Symptoms and Error Messages
Users experiencing this issue will see various error messages such as “The uploaded file exceeds the upload_max_filesize directive in php.ini” or “Maximum upload file size: 2MB” in their WordPress admin dashboard. These messages indicate that your current server configuration needs adjustment to accommodate larger files.
How to Fix WordPress Upload Max Filesize Exceeded Error Through PHP.ini
The most effective way to fix wordpress upload max filesize exceeded error is by modifying your PHP configuration file. Here’s a step-by-step approach:
- Locate your php.ini file in your hosting control panel or via FTP in the root directory
- Edit the following parameters:
upload_max_filesize = 64M post_max_size = 64M max_execution_time = 300 max_input_time = 300 memory_limit = 256M
These settings will increase your upload limit to 64MB and provide sufficient execution time for larger file uploads. Always ensure that post_max_size is equal to or larger than upload_max_filesize for optimal functionality.
Alternative Methods for Hosting Environments
If you don’t have access to php.ini, you can implement these solutions through your .htaccess file:
php_value upload_max_filesize 64M php_value post_max_size 64M php_value max_execution_time 300 php_value max_input_time 300
For users with WordPress multisite installations, you can also add these lines to your wp-config.php file:
@ini_set('upload_max_size', '64M'); @ini_set('post_max_size', '64M'); @ini_set('max_execution_time', 300);
Advanced Solutions and Server-Level Configurations
When basic PHP modifications don’t resolve the issue, consider these advanced fix wordpress upload max filesize exceeded error techniques:
Nginx Server Configuration
For Nginx servers, add this directive to your server block:
client_max_body_size 64M;
This setting specifically handles the maximum size of client request bodies, which directly affects file uploads.
WordPress Functions.php Modifications
You can also increase upload limits programmatically by adding this code to your theme’s functions.php file:
function increase_upload_limit() { @ini_set('upload_max_filesize', '64M'); @ini_set('post_max_size', '64M'); @ini_set('max_execution_time', 300); } add_action('init', 'increase_upload_limit');
Prevention and Monitoring Strategies
To prevent future upload issues, implement these best practices for wordpress upload management:
- Regular monitoring: Check your current upload limits in WordPress admin under Media > Add New
- Image optimization: Use tools like Smush or ShortPixel to reduce file sizes before uploading
- Staging environment: Test large uploads on a staging site first
- backup strategy: Maintain regular backups before making server configuration changes
Pro Tip: Always restart your web server after making PHP configuration changes to ensure the new settings take effect. Contact your hosting provider if you’re unsure about server restart procedures.
Troubleshooting Checklist
When implementing these solutions, follow this systematic approach:
- ☐ Verify current upload limits in WordPress dashboard
- ☐ Check available PHP configuration methods (php.ini, .htaccess, wp-config.php)
- ☐ Apply appropriate configuration changes
- ☐ Clear any caching plugins
- ☐ Test file upload functionality
- ☐ Monitor server performance after changes
By following this comprehensive fix wordpress upload max filesize exceeded error guide, you’ll successfully resolve upload limitations and ensure smooth file management on your WordPress website. Remember that different hosting environments may require specific approaches, so don’t hesitate to consult your hosting provider’s documentation for platform-specific instructions.

