How to Increase the Maximum File Upload Size in WordPress

They are three simple options to increase the maximum file upload size in WordPress. Some of the plugins and themes take a huge upload file size limit that will stop you from upload files via media uploader or install plugins and themes. So in this, I show you how to increase immediately the maximum file upload size to fix this problem.
If you want I know your current upload file size limit. Click on Media » Add New and you will see the current maximum file upload size limit for your WordPress site.
They are multiple options to Increase your upload file size following three methods will help you to increase your upload file size.
1. Using .htaccess
In root directory, you have .htaccess file using that you can increase the maximum upload file size limit in WordPress. Now edit the file and change the file size that you need.
1 2 3 4 5 |
php_value upload_max_filesize 128M php_value post_max_size 128M php_value memory_limit 256M php_value max_execution_time 300 php_value max_input_time 300 |
Note: If you can’t able to see .htaccess file in your web hosting here you have an article Click Here
2. Using PHP.INI file
In the root directory create or edit an existing php.ini file. Maximum cases in shared hosting, you can’t see a php.ini file in your root directory. Now create a file named php.ini and upload it in the root directory. Add the following code given below this will help you to increase the upload file size.
1 2 3 |
upload_max_filesize = 128M post_max_size = 128M max_execution_time = 300 |
3. Using functions.php file
In the WordPress theme, we have the functions.php file, using that We can increase the upload file size by adding the following code in the theme’s functions.php file.
1 2 3 4 5 |
@ini_set( 'upload_max_size' , '128M' ); @ini_set( 'post_max_size', '128M'); @ini_set( 'memory_limit', '256M' ); @ini_set( 'max_execution_time', '300' ); @ini_set( 'max_input_time', '300' ); |
May this step not works in shared hosting then contact your hosting provider to increase your upload file size limit for you.
Mraj
Creative Designer & Developer specialist by the spirit and a loving blogger by thoughts. If you have any questions let me drop an email with the article name to the following email id: [email protected]