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.
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.
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.
@ini_set( ‘upload_max_size’ , ‘128M’ );
@ini_set( ‘post_max_size’, ‘128M’);
@ini_set( ‘max_execution_time’, ‘300’ );
This 128M is the file size limit, you can choose the one best suited for you.
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.
upload_max_filesize = 128M
post_max_size = 128M
max_execution_time = 300
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.
php_value upload_max_filesize 128M
php_value post_max_size 128M
php_value max_execution_time 300
php_value max_input_time 300
Now for this method you have to go to your wp-config.php file and put in the below 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.
- How to know how many viewers using adblock
- How to change login logo in WordPress
- How to add YouTube subscribe button in WordPress
- How to downgrade plugins
If you liked the post then please share it, and to ask a question or for starting a conversation use the comment section below.