How to Increase the Media Upload Size to Maximum in WordPress?


Do you want to increase the file upload size of your WordPress website? Sometimes, having a low upload size limits can stop you from uploading your media files, or install themes and plugins. So, to avoid having these problems, you need to increase the file limit size.

Here, we will show you can increase the file upload size to maximum and fix the issues related to the low upload size limit.

Method 1: Adding Codes in Theme Function File

One of the common methods to increase the file upload size of your website is by adding codes in theme function.php file:

@ini_set( ‘upload_max_size’ , ’64M’ );

@ini_set( ‘post_max_size’, ’64M’);

@ini_set( ‘max_execution_time’, ‘300’ );

Method 2: Creating or Editing an Existing PHP.INT file

To apply this method, you will need to access the root folder of your WordPress website using FTP or File Manager app from the hosting account of your cPanel dashboard. 

If you are using shared hosting then, you will not see a file in your directory. In that case, you need to create a file called and upload it to the root folder. Then, add the following codes in that file:

upload_max_filesize = 64M

post_max_size = 64M

max_execution_time = 300

This method is reported to be worked for many users. 

Method 3: Through htaccess 

You can also increase the media upload size from .htaccess method by modifying the file in the root directory. Edit your .htaccess file in your WordPress website root folder and add the following codes:

php_value upload_max_filesize 64M

php_value post_max_size 64M

php_value max_execution_time 300

php_value max_input_time 300

Method 4: Editing wp-config.php File

Another way of increasing the file upload size in the WordPress website is by defining the size parameter in the wp-config.php file. To do that, you need to access your WordPress root directory using SSH or FTP and locate a wp-config.php file.

Open the file in any text editor and add the following codes:

@ini_set( ‘upload_max_size’ , ’20M’ );

@ini_set( ‘post_max_size’, ’13M’);

@ini_set( ‘memory_limit’, ’15M’ );

Method 5: From Plugin Method

Not everyone is fond of writing codes or accessing the root files using SSH or FTP. If you in such category people, you can take the help of WordPress plugin available –  Increase Max Upload File Size plugin to increase the upload size of your media file. 

Install and activate the plugin. 

Once activated, go to the plugin settings and enter the value for the upload size.

Once done, click on “Save Changes” to save the settings.

written by Sam

Leave a Reply

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