5 Ways to Increase Maximum File Upload Size in WordPress

0
5 Ways to Increase Maximum File Upload Size in WordPress
5 Ways to Increase Maximum File Upload Size in WordPress

How to Increase the Maximum File Upload Size in WordPress


OOPS!”I have not enough memory to upload my media files”. You mostly run into an issue of uploading files to your WordPress site isn’t? In this post, we will dig into the root of the problem and look for a quick fix to increase the maximum file upload size in WordPress which keeps your site active and pretty with all your media files.

Let’s have a look at the basic ways to upload files in WordPress:

  1. Log in to your hosting provider by accessing their online file manager.
  2. Connect to your server via an FTP client like FileZilla.
  3. Upload your media, themes, or plugin files directly from the WordPress Dashboard.

Now, suppose you have a file of 30-40MB to upload which is exceeding the limit of max file size you will unable to upload and see the current max upload size on the bottom. By default, maximum upload size in WordPress ranges from 2MB to 150MB depending on the settings of your web hosting provider is giving by default. In case the current max upload size limit meets your demand then you can leave it as it is.

Let’s see how we can go about increasing the maximum file upload size in WordPress.

1Update your .htaccess file:

The .htaccess file is a special hidden file that contains various settings. To access your .htaccess file, connect to your server via FTP client or SSH and navigate to the folder where WordPress is installed. your root Take a look at directory and Open up .htaccess file in a code editor and add the following lines to increase the max upload size in WordPress.

php_value upload_max filesize 44
php_value memory_limit 233M
php_value post_max_size 139M
php_value max_execution_time 250
php_value max_input_time 250

Here, you can replace the number as per your requirement. The max execution time and max input time are in seconds. The execution time defines the limit of time spent on a single script. Maximum limits are: 64M, 256M, 128M, 300, 300.

2Edit your theme’s function.php file:

In some situation, if you are not getting your .htaccess file, then just adding the few code lines in the theme function’s file, you can increase the upload size:

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

Note*Above techniques may not work if you are on a shared hosting package.

3Create or Edit an existing PHP.INI file:

Look for a solution if you are on a shared host, you will not see a php.ini file in your directory. If you do not see one, then create a file called php.ini and upload it to the root folder and go with the following code:

upload_max_filesize = 64M
post_max_size = 64M
max_execution_time = 300

4Contact your hosting provider:

Moreover, you do not want to edit the files, the problem with placing a code yourself then you can always contact your hosting provider to do it for you. Many hosting companies have chat support which can help you out quickly in increasing an upload limit.

5Use Plugin

An alternative, to above solution you can also use a plugin to increase the max upload size by installing it on your WordPress. Increase Max Upload Filesize plugin increase upload size limits up to 250Mb and more. It is very Lightweight- Only 2KB.

LEAVE A REPLY

Please enter your comment!
Please enter your name here