Skip to content
Home » How to increase File Upload size in WordPress

How to increase File Upload size in WordPress


Do you want to increase upload file size in WordPress? Sometimes low file upload limit can prevent you from uploading media or something by installing plugins and themes. In this article, we will show you how to easily increase the file upload size in WordPress to fix those problems.

Depending on the hosting provider and package you choose, everyone will see the maximum file upload limit on the Media Uploader page in WordPress. Most of it will be pretty low at around 2MB, some big plugins or themes you won’t be able to upload.

increase file upload size

Note: This is a guide which requires very little technical knowledge. This may not work with some shared hosting, in which case you will need to ask your hosting provider for assistance. I’m using VPS Vultr so it’s easy to edit.

Check Upload File Size Limit in WordPress?

WordPress will automatically show the maximum file upload size limit when you upload images or media. To test this, you can simply go to Media » Add New and you will see the maximum upload file size limit for your WordPress site.

1. Edit the functions.php file to increase the file upload size

There are cases where we have found that by simply adding the following code to the theme’s functions.php, you can increase the file upload size.

@ini_set( 'upload_max_size' , '64M' );
@ini_set( 'post_max_size', '64M');
@ini_set( 'max_execution_time', '300' );

2. Create or Edit Existing PHP.INI File

For this method, you will need to access the root of your WordPress site using FTP or a file manager for hosting with Cpanel.

In most cases, if you are using a shared host, you will not see the php.ini file in your directory. If not, create a file called php.ini and upload it to the root directory. In that file, add the following code:

upload_max_filesize = 64M
post_max_size = 64M
max_execution_time = 300

This method of increasing the file upload size works well in many cases. However, keep in mind that if 64M doesn’t work. Try 10MB (sometimes it works).

3. Edit the .htaccess File

Some people have tried using the .htaccess method, by modifying the .htaccess files in the root directory, you can increase the maximum upload file size in WordPress. If you don’t see it, that’s why the .htaccess file can’t be found on WordPress. Then open or create a .htaccess file in the root directory and add the following code:

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

Again, it is important that we emphasize that these tips may not work if you are using a shared hosting plan. In that case, you will need to contact your web hosting provider to increase the upload capacity. Some servers reject their users outright.

Leave a Reply

Your email address will not be published. Required fields are marked *