How to increase default upload limit in WordPress

0

There are some WordPress websites who have a default upload limit set to very low.

how-to-increase-default-upload-limit

By default WordPress have placed an upper limit for the file size by default, this does not affect most of the people who at the maximum have to upload images and small files But for few who like to place big files on their WordPress website gets stuck with this default upload limit. Rather than relying on other options, you can simply increase default upload limit in WordPress.

increase-default-upload-limit

This limit is placed by hosting companies, if you have a low upload limit then this tutorial is the one big help for you. This is fairly easy to do, we are going to explain the 5 different ways by which you can increase default upload limit in WordPress.

Lets start with methods to increase default upload limit in WordPress.

We are going to start with the code method and then will give a plugins way for those who don’t know or like to go coding.

1) Functions.php

For this you can use the editor under Dashbord»Appearance»editor or use the ftp to find and edit the file.

When you open the file named functions.php then put in the code below in it and hit save. For ftp users upload the file back.

[code]
@ini_set( ‘upload_max_size’ , ‘128M’ );
@ini_set( ‘post_max_size’, ‘128M’);
@ini_set( ‘max_execution_time’, ‘300’ );
[/code]

This 128M is the file size limit, you can choose the one best suited for you.

2) Php.ini

For most of the users having a shared hosting php.ini will not be there, you have to find this file in the root directory. If it is not there then you just create one and put the below code in it.

[code]
upload_max_filesize = 128M
post_max_size = 128M
max_execution_time = 300
[/code]

Again if you are using this method then change the 128M to the maximum size you like to upload.

3) Editing .htaccess file

You can use your .htaccess file to increase default upload limit, For this you have to place the below code in it.

[code]
php_value upload_max_filesize 128M
php_value post_max_size 128M
php_value max_execution_time 300
php_value max_input_time 300
[/code]

4) Wp-config.php

Now for this method you have to go to your wp-config.php file and put in the below code.

[code]
define(‘WP_MEMORY_LIMIT’, ‘128M’);
[/code]

5) Using a plugin

For those who don’t know or hate to get messed up in code, they can use a plugin. Using a plugin have its benefits, you can change the default upload limit anytime with an ease. For this you have to install and activate a plugin called, increase max upload file size.

This plugin uses the php.in or php5.ini file, if it’s not there then this plugin will create it automatically and increase default upload limit to 32MB, and if you want to change the things further the you have a section under tools. There you can make changes to make the limit change to your choice.

Further read:

If you liked the post then please share it, and to ask a question or for starting a conversation use the comment section below.

You can follow us on twitter, facebook, Google+

 

Leave a Reply

Your email address will not be published. Required fields are marked *