Modifying .htaccess causes server error 500

Posted June 17, 2020 2k views

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

I tried all the changes but the last filter approach here too changing max_file_upload size in


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

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


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

edited by MattIPv4

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.

Submit an Answer
2 answers

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.


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

  • and just to be sure here’s from the page I checked:
    Virtual Directory Support disabled
    Configuration File (php.ini) Path /etc/php/7.4/fpm
    Loaded Configuration File /etc/php/7.4/fpm/php.ini
    Scan this dir for additional .ini files /etc/php/7.4/fpm/conf.d

    php-fpm active
    Directive Local Value Master Value
    cgi.discardpath 0 0
    pathinfo 1 1
    cgi.forceredirect 1 1
    cgi.nph 0 0
    statusenv no value no value
    headers 0 0
    fastcgi.error_header no value no value
    fastcgi.logging 1 1
    fpm.config no value no value

    • You can change the upload size from here :


      After you do, remember to restart apache for the effect to take place.

      • Unfortunately, that’s one of the 4 things I changed already as mentioned in original post:

        ; File Uploads ;
        ; Whether to allow HTTP file uploads.
        file_uploads = On
        ; Temporary directory for HTTP uploaded files (will use system default if not
        ; specified).
        ;upload_tmp_dir =
        ; Maximum allowed size for uploaded files.
        upload_max_filesize = 512M
        post_max_size = 512M
        memory_limit = 512M
        edited by MattIPv4

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