Solution is very simple but sometimes takes time to figure out what to do. What is the best way to increase
Maximum upload file size? In my opinion, changing setting using cPanel is the safest and fastest way to increase file size limit.
Method-1 using cPanel?
- Login to cPanel
- Look for section
- Click on
Select PHP version
- Make sure right PHP version is selected. I would suggest to use
- Click on
Switch to PHP Optionslink.
- Look for an Option
- Set value to
SaveButton to save settings.
Now next step is to verify if it’s working or not? Go to WordPress
Add New and you should see
maximum size changed to 8MB.
few more methods you could try if you want. Make sure to just use single method on your WordPress site.
Method-2 .htaccess method
php_value upload_max_filesize 8M
php_value post_max_size 8M
php_value max_execution_time 240
php_value max_input_time 240
Above code will change maximum upload size to
8MB. You could change it to any value like 32MB or 64MB as per your need.
240 (4 minutes) is a
Timeout setting in seconds.
Method-3 wp-config.php method
Just put below code at the bottom of wp-config.php file
define( ‘WP_MEMORY_LIMIT’, ‘8M’ );
define( ‘WP_MAX_MEMORY_LIMIT’, ‘8M’ );
ini_set( ‘memory_limit’, ‘8M’ );
Let me know which method worked best for you.
Join the Discussion
Share & leave us some comments on what you think about this topic or if you like to add something.