How to increase maximum upload limit file size in media of wordpress?, Who working with wordpress, they may get this problem.
The latest version (3.9) of wordpress Maximum Media library file upload size is 32MB. It was 10MB in version (3.6). If you are using old version then it allow maximum 2MB file upload limit only. You want upload more than 32MB files, you must increase that. For example you want upload some zip files for download, or audio, video, flash and other video Media files means, this 32MB also not enough.
Increase maximum upload limit file size in media of WordPress
There is 4 ways to increase maximum upload limit file size in media of wordpress.
- PHP version change
- .htaccess way
- Theme’s Functions.php File
- PHP.INI file method
Here, I’m going to change my maximum upload limit from 32MB to 1GB (1024MB) using above methods. We have to change maximum execution time also.
Take backup of .htaccess file, functions.php file or php.ini file, which method you are going to use. It’s important. Use one-by-one methods. Some methods may not support, because of wordpress versions. How to Install WordPress in Local Server?
This is open method. Upgrade your PHP version by following way,
cpanel -> software and services -> Select PHP Version.
You can get .htaccess file from root folder of your website. Mostly it’s hidden. So using FTP makes sense. Or you have to open your file manager with hidden files.
If there is no .htaccess file, create and upload/paste in root (before creating .htaccess file, make sure there is no .htaccess file). Paste the following code,
php_value upload_max_filesize 1024M
php_value post_max_size 1024M
php_value max_execution_time 1000
php_value max_input_time 1000
In this 4 methods, this is easy way. Open your theme’s functions.php file. You can find function.php file by following way,
wp-content –> themes –> select your current Theme -> functions.php file
And, just add following code at there,
@ini_set( ‘upload_max_size’ , ‘1024M’ );
@ini_set( ‘post_max_size’, ‘1024M’);
@ini_set( ‘max_execution_time’, ‘1000’ );
You can find your php.ini file in root folder. Sometime you can’t find there. No problem, just create one php.ini file and paste/upload in your root folder with following code. If already file is there, just add this code,
upload_max_filesize = 1024M
post_max_size = 1024M
max_execution_time = 1000
Extra: Solution for Fatal error: Maximum execution time of 30 seconds exceeded