A comprehensive database for everything WordPress related.

TOP
WPKlik Logo Newsletter

Sign up and get your free copy of WordPress blogging checklist 2019

Ways Increase Maximum File Upload Size in WordPress

Ways to Increase Maximum File Upload Size in WordPress

During your WordPress use, sometimes low file upload size limit could cause some problems for you. For example, this can occur if you want to install certain themes or plugins that require extra space, or if you want to upload files. That’s why we have decided to provide you with different ways to increase maximum file upload size in WordPress that will help you rid of this issue for good.

Check your Maximum file upload size limit

Before you start, you have to check your maximum upload size limit. When you want to upload media content or images, WordPress will display this automatically for you. In order to see this, click on Media option and then go to Add New. Here, you will be able to see the maximum limit of your file upload size.

increase-file-size-wordpress

1. Functions file

First, we advise you to try this method, as there are chances it will be enough to solve this problem for you. It involves insertion of the code in theme’s file called functions.php. This file can be used to enhance the range of capabilities of your template, as well as the WordPress platform itself. Once you access this file, try adding the following:


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

2. Make or edit a php.ini file

In order to try this method, you will have to enter the root folder of your WordPress site. You can do this with the help of FTP or File Manager in cPanel dashboard of your hosting account.

If you’re using shared hosting, there is a high possibility that you won’t see a php.ini file in your directory. In this case, simply make your own file and name it php.ini. Afterwards, upload it to the root folder of WordPress. Finally, you should insert:


max_execution_time = 300
upload_max_filesize = 128M
post_max_size = 256M
memory_limit = 128M

 3. Modify .htaccess file

If none of our suggestions so far have solved your problem, then this third one should most likely do it for you. Many people have reported that .htaccess method helped them increase maximum file upload size.

First, edit your .htaccess file which is located in root folder of WordPress. Then add this code into it:


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

We’d only like to note that this tutorial may not work depending on whether you use certain types of shared hosting. Then, make sure to contact your web hosting service provider and ask them to increase maximum file upload size in your stead. But hopefully, one of these methods we’ve listed has managed to fix this annoying issue for you.

We hope that you found this article to be helpful. If you liked it, please feel free to check out some of these articles as well!

Newsletter

WordPress perfection at your fingertips.

If you enjoyed this article, feel free to subscribe to our newsletter using the form below. You can also follow us on Facebook and Twitter and subscribe to our YouTube channel for WordPress video tutorials.

Leave a Reply