It can be frustrating to encounter limitations when uploading large files to your website, especially when adding high-resolution images, videos, or other significant files.
In this article, we will guide you through the process of changing your server's maximum upload file size.
Note: This troubleshooting guide may require that you make server-side changes to your website.
If you are uncomfortable making those changes, you must contact your hosting provider for assistance.
When uploading a theme, a plugin, or a file in the WordPress Media Library, you may encounter the following error:
The uploaded file exceeds the upload_max_filesize directive
This happens when the uploaded file is larger than the allowed size for files uploaded on your server.
Steps to Ensure upload_max_size is Set Correctly
Check the Current Upload Limit
- Go to the WordPress Dashboard → Tools → Site Health 
- Click on the Info tab 
- Expand the Server option 
- Check the value for Upload max filesize 
If you are using the Divi theme, Extra theme, or Divi Builder plugin, check the System Status information in WordPress Dashboard → Divi/Extra → Support Center
Modify php.ini File
- Access your server via FTP or the hosting's File Manager (cPanel) 
- Locate the php.ini file (usually in the root directory or a directory like - /etc/)
- Edit the php.ini file and add or modify the following lines: - upload_max_filesize = 64M 
 post_max_size = 64M
- Save the file and restart your web server 
Modify .htaccess File
- Access your server via FTP or the hosting's File Manager(cPanel) 
- Locate the .htaccess file in the root directory of your WordPress installation 
- Add the following lines to the .htaccess file: - php_value upload_max_filesize 64M 
 php_value post_max_size 64M
- Save the file 
Modify wp-config.php File
- Access your server via FTP or the hosting's File Manager(cPanel) 
- Locate the wp-config.php file in the root directory of your WordPress installation 
- Add the following lines to the wp-config.php file: - @ini_set( 'upload_max_size' , '64M' ); 
 @ini_set( 'post_max_size', '64M');
- Save the file 
Using .user.ini File
- Access your server via FTP or the hosting's File Manager(cPanel) 
- Create or edit a .user.ini file in the root directory of your WordPress installation 
- Add the following lines to the .user.ini file: - upload_max_filesize = 64M 
 post_max_size = 64M
- Save the file 
Using the Hosting Control Panel
- Log in to your hosting control panel (e.g., cPanel, Plesk) 
- Find the PHP configuration settings 
- Increase the upload_max_filesize and post_max_size values 
- Save the changes and restart the web server if required 
Using a WordPress Plugin
- Install a plugin like MaxUploader – Increase Media Upload File Size | Increase Execution Time 
- Follow the plugin instructions to increase the upload limit 
- Verify the new upload limit in WordPress Dashboard → Tools → Site Health → Info → Server 
Contact Your Hosting Provider
- If you cannot change the settings yourself, or if changes do not take effect, contact your hosting provider. 
- Request them to increase the upload_max_filesize and post_max_size limits. 
Notes:
- For more detailed information on how to change other PHP directive's values on your server, please check our Is The WordPress Upload Limit Giving You Trouble? Here’s How To Change It article. 
- If you are looking for better hosting, we recommend Divi Hosting, which is optimized and configured specifically for the Divi Theme and comes with Divi preinstalled 


