I have a one click Wordpress installation and followed the solution here and I’m still getting server error 500 when I modify php_value upload_max_filesize 128M in .htaccess (this used to be the only way that worked)
I followed the change in virtualhosts suggested on [DO here] (https://www.digitalocean.com/community/questions/when-i-add-mod_expires-rules-in-htaccess-file-i-am-getting-500-server-error)
I tried all the changes but the last filter approach here too changing max_file_upload size in
.user.ini
wp-config
/etc/php/7.4/fpm/php.ini
adding this to .htaccess (doesn’t cause error 500):
suPHP_ConfigPath ../../../etc/php/7.4/fpm/
I used to be able to change .htaccess before setting up http/2 in case that helps now my php handler is FCGI. My support post on [DO] (https://www.digitalocean.com/community/questions/modifying-htaccess-causes-server-error-500?comment=89044) didn’t fix the problem–they only suggested changing php.ini as I already did here:
; File Uploads ;
;;;;;;;;;;;;;;;;
; Whether to allow HTTP file uploads.
; http://php.net/file-uploads
file_uploads = On
; Temporary directory for HTTP uploaded files (will use system default if not
; specified).
; http://php.net/upload-tmp-dir
;upload_tmp_dir =
; Maximum allowed size for uploaded files.
; http://php.net/upload-max-filesize
upload_max_filesize = 512M
post_max_size = 512M
memory_limit = 512M
Thanks in advance!
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Hi there @frankieguz,
Adding the values directly to your .htaccess fill will not work as you are using PHP FPM rather than PHP DSO.
What I would recommend is:
php.ini file your website uses. To do so, in your document root just create a file called info.php and add the following content:<?php
phpinfo();
?>
Then visit the file directly in your browser: yourdomain.com/info.php.
There search for the PHP.ini value and make sure that you are making the changes to that php.ini file.
Also once you make the change to the php.ini file note that you need to restart PHP FPM in order for this to take effect.
Let me know how it goes. Regards, Bobby
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.