How to change the maximum upload file size

Home Forums BulletProof Security Free How to change the maximum upload file size

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #15051
    Robald
    Participant

    Hi the code: php_value upload_max_filesize 64M doesn’t work in the admin .htaccess. How i can raise the max upload?

    Thank you.

    #15053
    AITpro Admin
    Keymaster

    php_value and php_flag directives only work in an .htaccess file depending on your Server type and if your Host has specifically allowed this.  I do not believe using ini_set in your wp-config.php file will work.  Create a custom php.ini file and add these directives below in your custom php.ini file.  If you are not sure how to create a custom php.ini file then contact your host and they will create a custom php.ini file for your website and add the 64M value.

    http://stackoverflow.com/questions/2184513/php-change-the-maximum-upload-file-size

    You need to set the value of upload_max_filesize and post_max_size in your php.ini :

    ; Maximum allowed size for uploaded files.
    upload_max_filesize = 40M

    ; Must be greater than or equal to upload_max_filesize
    post_max_size = 40M
    If you can’t change your php.ini, you’re out of luck. You cannot change these values at run-time; uploads of file larger than the value specified in php.ini will have failed by the time execution reaches your call to ini_set.

    #15056
    Robald
    Participant

    My host told me that i can do it in the .htaccess.

    #15057
    AITpro Admin
    Keymaster

    Then you would add this code in your Root .htaccess file (you need to add both of these in order for it to work & they need to be in your Root .htaccess file):

    php_value upload_max_filesize 64M
    php_value post_max_size 64M
    

    To BPS Custom Code in this Custom Code text box:  CUSTOM CODE TOP PHP/PHP.INI HANDLER/CACHE CODE.
    Click the Save Root Custom Code button.
    Go to the BPS Security Modes page and click the Root Folder BulletProof Mode Activate button.

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.