What are the Best Ways to Increase File Upload Size in WordPress

By posted on August 10, 2017 10:17AM

The problem that most of the users are facing is the limit for file upload size in WordPress, they cannot upload files in any size by default it’s about 2Mb in WordPress.

In TechSolutionTips, We talked a bit about this problem, but in today’s article, we are fully addressing this issue to be solved.

You usually see this error when you want to upload a file that has exceeded the file size limit which is allowed in WordPress.

First, you need to know why such a thing happens.

Some of the webmasters are really having trouble solving this issue. But the main reason for limiting file Upload size is a bit security issue so that people should not upload large files such as a bulk Video file, But Unfortunately, allowing 2 or 5 MB is not a fair.So what to do to increase the volume of uploading a file in WordPress?

file upload size in wordpress

Increase file upload size in WordPress

There are three practical ways to increase the file Upload size in WordPress, which can solve this problem,

  • Increase the file volume with the help of WordPress setting ·
  • Ask Help of Hosting Provider·
  • Server settings

A. Increase File Upload Size with site settings 

In the Media Section which is available in the WordPress dashboard, you can modify the file uploading size for the multi user websites, if there is no problem and limit from the server side, this section can help you to increase the file upload size in WordPress.

B. Ask Help of Hosting Provider

If you could not enter your desired number in the previous step, this is because your service provider has created restrictions.So, in this case, the best way to solve the problem you need to contact them and ask for increasing the volume of uploading a file in WordPress

C. Server settings

Many servers provide this option. But you need to know some things and have information so you can increase the number of file uploads in WordPress. With the help of following steps,

  • POST_MAX_SIZE·
  • VPLOAD_MAX_FILeSIZe·
  • Memory_limit

We need to set these three things to solve the upload problem. The ways to solve this problem with the help of these three steps are as follows:

1. Change PHP settings in cPanel

If you use a Linux host, you can easily change it. To do this, click on the select PHP version option in the panel.

file upload size in wordpress

Then click on the Switch to PHP Options

file upload size in wordpress

Here you can find the section of upload size, change that and then save the settings.

file upload size in wordpress

But most of the Hosting Provider limits this section as well for the security reason they just allow to change only the Version of PHP and Switch to PHP option is disabled.

2. Create php.ini file

By default, the php.ini file is one of the basic files for increasing the file upload size in WordPress, which is set on the server. Due to limitations, there is a possibility that this file is not available for you and you cannot use it. But you can create a “php.ini” file and edit that to place the following code in it.

upload_max_filesize = 12M
post_max_size = 13M
memory_limit = 15M

Some hosts need ‘suphp’ to read the settings. This command should be in .htaccess and if it does not, enter the following code in .htaccess file:

<IfModule mod_suphp.c>
suPHP_ConfigPath /home/yourusername/public_html
</IfModule>

3. Create user.ini file

If the above method does not work, then the general settings of your website are closed and you can instead create a “user.ini” file or edit it if you have one. If you don’t see that file in your cPanel create a “user.ini” file in the root of your cPnale and past the following code on it save the file

upload_max_filesize = 12M
post_max_size = 13M
memory_limit = 15M

4. Create or set up .htaccess file

This file is a hidden and important file that can help you make many adjustments. First, locate this file in root and then enter the following code in it.

php_value upload_max_filesize 12M
php_value post_max_size 13M
php_value memory_limit 15M

If you receive an internal server error, your server will run PHP in CGI mode and this is not possible.

5. Use the ini_set instruction in PHP

We will review the last setup together, to setup this method, go to your cPanel and find the “wp-congig.php” file and paste the following code and save that.

@ini_set( 'upload_max_size' , '12M' );
@ini_set( 'post_max_size', '13M');
@ini_set( 'memory_limit', '15M' );

Nginx settings

Nginx is an active Web server that works well with the old Apache. It’s much better and faster than Apache. To increase the volume of file uploading in WordPress in this web Server, find the php.ini file and paste the code below and save that.

http { client_max_body_size 13m; }

With the steps above, we are sure that there will be no problem, for uploading a higher volume file in WordPress.

So Enjoy Uploading

Hi, I’m Irfan! Microsoft Certified IT Professional. SEO Expert & Content Writer I like to write about Computer Network, WordPress, Blogging Tips, SEO, Make Money Online, Computer IT Tips, and Creating Tech Tutorials. Thanks For Visiting TechSolutionTips.com.

How to whitelist website on AdBlocker?