How to Increase Maximum Upload File Size in WordPress

Trying .htaccess 2020

If you’ve tried the php.ini solutions, and none of them worked, there may be a solution that lies in your htaccess file. In general, htaccess is used to configure an Apache server. However, it can also be used to change PHP values, if your PHP version is set up as an Apache module.

Before you edit your htaccess file, make sure you have a backup. Changing this has the ability to cause an Internal Server Error or a blank white screen, which can easily be removed by simply re-uploading your original htaccess file.

To access your file, go to the root directory of your WordPress install. Make sure that you’ve enabled your FTP client to view hidden files, then open up the file labeled “.htaccess” to edit. At the bottom of the file, paste in this code:

01php_value upload_max_filesize 64M
php_value post_max_size 64M
php_value max_execution_time 300
php_value max_input_time 300

Then save this back to your server. Visit your site, and look for any errors. Then, you can go to Media -> Add New to see if your maximum upload size has taken effect. If you run into any problems, upload the backup htaccess file you saved locally.

WordPress Config File

If all else fails, there is one more trick you can try. This will require editing your WordPress files directly.

The first step is to FTP into your server, and drag your “wp-config.php” file, located in the root directory, so that you can edit locally. Open up the file, and at towards the bottom add the line:

01define('WP_MEMORY_LIMIT', '64M');

Other Trying

While trying to list downloadable files in WordPress, I realized that the maximum upload file size was set at 8MB and my MP4 was 13MB in size. To fix this, I created a php.ini file in my wp-admin directory and added the following values:

upload_max_filesize = 32M
post_max_size = 32M

 recommend changing 32M to a value that is large enough to accommodate your uploads.

Note that some servers cache these files while others only recognizes php5.ini files. Which is why I recommend waiting at least 15 to 20 minutes for the changes to take effect after creating the php.ini file and if nothing happens, try renaming the file to php5.ini.

To see whether the size has changed, simply go to your ‘your WordPress admin panel > media > add new’ and look at the value that is displayed next to “Maximum upload file size”. You can see how I did all this in the video below:

Leave a Comment