How to increase Maximum Upload size in cPanel?

2020-02-08 15:08发布

I am using cPanel of my website to increase maximum upload file size for wordpress media uploads. I have used the codes(found out from google) for this purpose wp-config.php, .htaccess but nothing is working. In my cPanel, there is no service for php configuration editor under software / services section or anywhere else. Please help what should I do?

My .htaccess shows this code:

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress

I tried by placing the code:

php_value upload_max_filesize 20M
php_value post_max_size 20M

inside and outside # blocks, it gives 500 error rather.

12条回答
▲ chillily
2楼-- · 2020-02-08 15:38

In my case it was wp-admin/.user.ini:

post_max_size = 33M
upload_max_filesize = 32M
查看更多
forever°为你锁心
3楼-- · 2020-02-08 15:38

Login to your WHM panel if you have access to

Then go to Software -> MultiPHP INI Editor

Then select the php version from the dropdown, then scroll down for the upload_max_filesize which will be 2M by default, now increase it according to your need.

Also enable the file_uploads for HTTP file uploads for convenience.

If you don't have access to WHM, then follow the .htaccess method.

查看更多
劳资没心,怎么记你
4楼-- · 2020-02-08 15:38

You should not replace the text entirely. Add the text after the "# END WordPress".

查看更多
姐就是有狂的资本
5楼-- · 2020-02-08 15:42

New Cpanel Settings on a Godaddy
From Cpanel go to:

  • Software
  • Select PHP version
  • Click "Switch To PHP Options" located on upper right hand corner

Increase post max size and upload max file size, save and your done.

查看更多
你好瞎i
6楼-- · 2020-02-08 15:45

We can increase maximum upload file size for WordPress media uploads in 3 different ways.

That's are

  1. .htaccess way
  2. PHP.INI file method
  3. Theme’s Functions.php File

For .htaccess way, add 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

for PHP.INI file method, add following code,

upload_max_filesize = 1024M
post_max_size = 1024M
max_execution_time = 1000

for Theme’s Functions.php File, add following code,

@ini_set( ‘upload_max_size’ , ’1024M’ );
@ini_set( ‘post_max_size’, ’1024M’);
@ini_set( ‘max_execution_time’, ’1000′ );

For More Details->>>

查看更多
Emotional °昔
7楼-- · 2020-02-08 15:48

On CPanel 64.0.40 (I didn't try any other version): Go in "Software" then "Select PHP Version" then "Switch To PHP Options" then upload_max_filesize => click on the value and select the one you prefer :) It's super hidden for such a critical option...

查看更多
登录 后发表回答