To increase max or maximum upload file size in WordPress; You have a lot of options for this in WordPress, you can do this through cPanel, from wp-config.php, from .htaccess file, and with the help of plugins.
In this tutorial guide, we will show you step by step how you can increase the maximum file upload size in WordPress using cPanel, wp-config.php, .htaccess, and plugins.
How to Increase Maximum File Upload Size in WordPress Cpanel, Wp-config, htaccess, plugin
Here are seven ways to increase the max or maximum file upload size in WordPress using cPanel, modifying wp-config.php, .htaccess files, plugins, php.ini, and function:
#1 Using WordPress Plugins
If you don’t have much coding knowledge, no problem, you can also do it for plugins.
Let’s follow the following steps to ncrease maximum file upload size in wordpress using plugin:
- Log in to your Wp-admin dashboard.
- Navigate to “Plugins” -> “Add New” and search for a plugin called “Increase Maximum Upload File Size” or similar.
- Install and activate the plugin.
- Navigate to the installed plugin’s settings page.
- Change the maximum file upload size settings to your desired value (e.g., 128MB).
- Save the changes.
- Clear your browser cache.
#2 Increase Upload Size WordPress php.ini
Log in to cPanel and navigate to File Manager, then create a php.ini like the following:
And open the php.ini file for editing and add the following code to increase maximum file size using php.ini in WordPress:
upload_max_filesize = 25M post_max_size = 13M memory_limit = 15M
#3 Increase Max File Upload Size in WordPress wp-config.php File
In this method, simply navigate to your cpanel file manager and open wp-config.php file.
Now, open the file on Text Editor & add below lines at the bottom of your wp-config.php file.
@ini_set( 'upload_max_size' , '24M' );
@ini_set( 'post_max_size', '13M');
@ini_set( 'memory_limit', '15M' );
or you can add below line instead of above one.
define('WP_MEMORY_LIMIT', '256M');
Save the file & try to upload files on your WordPress site again. Hope this will solve the issue. Or you can try next method.
#4 Increase Maximum File Upload Size in WordPress htaccess
To edit the .htaccess file you will need to navigate to the WordPress installation directory again and make sure all of your server hidden files are visible. You can do this by simply clicking the Settings icon on the top right corner and checking the “Show hidden files” option.
Once you save the option, you will find all the hidden files visible including the .htaccess file. So, you need to edit the file using Text Editor & add the following lines to it:
php_value upload_max_filesize 64M php_value post_max_size 128M php_value memory_limit 256M php_value max_execution_time 300 php_value max_input_time 300
#5 Edit functions.php File
Simply login to wordpress dashboard and navigate to “Appearance>Theme File Editor>functions.php>functions.php”.
Once you find the file, edit it & add below lines on it.
@ini_set( 'upload_max_size' , '64M' );
@ini_set( 'post_max_size', '64M');
@ini_set( 'max_execution_time', '300' );
Your problem should be solved at this stage. But if you don’t get the solution, you should try the next way.
#6 Contact Your Hosting Provider
If you are not much expert to solve the problem by applying the above methods, then you have two options available!
- Contact Hosting Support Center
- Hire an Expert
#7 Increase Max Upload size WordPress Cpanel
- 1. Login hosting cPanel and Find the Software section, then Click on MultiPHP INI Editor.
- 2. Choose a newer PHP version (if available) to ensure compatibility and improved performance.
- 3. Select the “Options” or “Switch to PHP Options” button.
- 4. Find for the “upload_max_filesize” and “post_max_size” settings and set their values accordingly.
- 5. Save the changes and exit the cPanel.
Conclusion
That’s all; you can successfully increase the maximum file upload size in WordPress. Whether you prefer using cPanel, modifying wp-config.php or .htaccess files, or relying on plugins, these techniques provide you with the flexibility to meet your specific requirements.