Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

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.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
321 views
Welcome To Ask or Share your Answers For Others

1 Answer

On cpanel -> software and services -> Select PHP Version.

Choose a PHP version which not the native one (I recommend php 5.6 or last one) and you will have / see a new link "Switch To PHP Settings", click it, in PHP Settings you can set upload_max_filesize in last line , clicking on value ( default is 2M ) , and you got a dropbox with values that you can set to upload_max_filesize, and click save .


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share

548k questions

547k answers

4 comments

86.3k users

...