Increase maximum upload file size in WordPress plugin

Are you facing the Max File Upload Size issue in your wordpress website? Sometimes Upload Size limit does not allow to upload big size files through CMS or install themes and plugins. So Here, We will show you to fix this issue easily so that you can upload any larger file in your wordpress area.

First, You need to check your wordpress upload size, Here is how you can check:

For this, You just have to go to Media » Add New and you will see the Limit “Maximum upload file size” under the Select Files button. The written limit is the limit that is permitted for file size. Here is the screenshot you can check:

Increase maximum upload file size in WordPress plugin

Here are some methods on how you can increase the Maximum File Upload Size:

1: By Editing Theme Functions File

There is a posibility that by adding following code to your theme’s functions.php file, The upload size can be increased:

1

2

3

@ini_set( 'upload_max_size' , '64M' );

@ini_set( 'post_max_size', '64M');

@ini_set( 'max_execution_time', '300' );

2. By Creating or Editing an existing PHP.INI file

To use this method, You will need to have access to the root directory of your wordpress installation by using either FTP or File Manager in your Cpanel Dashboard.

In case of a shared hosting, There will be no php.ini file present. In this case, you can simply create an empty php.ini file and add the following code to your file:

1

2

3

upload_max_filesize = 64M

post_max_size = 64M

max_execution_time = 300

This method should work most of the times. You can try changing values from 64M to 20M or 128M to check if it works or not.

3. htaccess Method

This is the last method which is highly effective and it works for so many users. For this method, you will have to update your .htaccess file in your wordpress root directory. Edit the file and add the following code:

1

2

3

4

php_value upload_max_filesize 64M

php_value post_max_size 64M

php_value max_execution_time 300

php_value max_input_time 300

Note: These changes may not work if you are on a shared hosting server, In that case you will have to contact your Hosting Provider and ask them to increase this for you.

There are 4 ways that you can choose to increase the maximum upload file size in WordPress.

1. Use our plugin (easy)

https://import.wp-migration.com

2. Contact hosting provider (medium)

Reach over to the customer support of your hosting provider and ask them to increase these limits for you
If you are still unable to import your file, the easiest way to figure out the problem is to request error logs from your hosting provider for your website. Examine the logs around the time when you tried to import the backup.
You will see what limit you have encountered and increasing it will solve the issue.

3. Do it yourself (hard)

Edit .htaccess file

php_value upload_max_filesize 128M
php_value post_max_size 128M
php_value memory_limit 256M
php_value max_execution_time 300
php_value max_input_time 300

or

Edit wp-config.php file

@ini_set( 'upload_max_filesize' , '128M' );
@ini_set( 'post_max_size', '128M');
@ini_set( 'memory_limit', '256M' );
@ini_set( 'max_execution_time', '300' );
@ini_set( 'max_input_time', '300' );

upload_max_filesize – set this to a value > than your backup
post_max_size – set this to a value > than your backup
memory_limit – set this to a value > than your backup
max_execution_time – set this to 0 (infinite)