How to Increase File Upload Size in WordPress

When it comes to uploading files, WordPress has set a maximum file size by default. You can see your current maximum file upload size in WordPress by navigating to Admin Dashboard -> Media -> Add New. By default, WordPress has set this to 2 MB. This is absolutely not enough if your website uses high quality images, audio, and video.

increase file upload size in WordPress

There are three settings within the PHP info file that decides your file upload limit. In this article, I will show you how to increase each parameter in order to increase file upload size in WordPress.

  • memory_limit – Limit of how much memory is allocated to PHP
  • post_max_size – Limit of maximum size that is handled in a POST request.
  • upload_max_filesize – Limit of maximum file size that can be uploaded.

 

1. Through Your Hosting Provider

You can easily increase file upload size in WordPress by contacting your hosting provider. Simply ask them to increase the file size and memory limit. Feel free to choose a size that fits your needs depending on the nature of the website.
 

2. Create Or Edit php.ini File

This is the best way to increase file upload size in WordPress. Navigate to your website cPanel and open up the File Manager. Now find the php.ini and add the code below. If you can’t find the php.ini file, create the file and upload it.

 

3. Create Or Edit .htaccess File

The .htaccess file in your server can be used to increase file upload size in WordPress. It is a hidden file in your website root directory. Navigate to your website cPanel and check the option to view hidden files. Open up the .htaccess file and add the following code. If you don’t have a .htaccess file, create a one and add the code.

 

4. Use The ini_set() PHP Function

You can also increase file upload size through wpconfig.php file. Navigate to your website cPanel and open the wpconfig.php file and add the code below. You can also try adding the code to theme’s functions.php file as well.

 

5. NGINX Settings

If you are using NGINX server software instead of Apache, you must follow the second method mentioned above to edit the php.ini file. You must also edit the NGINX config file and add the following code.

After editing both php.ini and NGINX config file, run the following code to reload the server services and you are done.

 
As you can see from methods mentioned above, increasing file upload size in WordPress is an easy task. Make sure to follow all the directions and not to mess with any original file codes or settings. If you have any questions or run into any problems, feel free to comment below for further assistance.
 
Also read: How to Optimize WordPress Image Compression

Leave a Reply