Question

Modifying .htaccess causes server error 500

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] (https://kinsta.com/blog/wordpress-maximum-upload-file-size/) changing max_file_upload size in

wp-config

in php.ini adding this to .htaccess (doesn’t cause error 500)

<IfModule mod_suphp.c> 
suPHP_ConfigPath ../../../etc/php/7.4/fpm/
</IfModule>

.user.ini

I used to be able to change .htaccess before setting up http/2 in case that helps Thanks in advance!


Submit an answer

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!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

Great I see it is FCGI now–is there documentation for how to change the upload size somewhere on DO forums?

Hi @frankieguz,

THe option php_value upload_max_filesize 128M in your .htaccess is breaking your website as that option is used only when you have the PHP handler DO set. This handled it pretty much outdated and no one is using it anymore.

To find out which PHP handler you are using, I’ll recommend creating a PHP info file that will display it there.You’ll need to create the file in your website’s directory so that you can open it later. In the file add the following content

<?php phpinfo();

Save and close the file. You can now open the file in your browser. There it will say loaded configuration and the PHP handler. Most probably it’s FCGI.

Regards, KDSys