Skip to content

Instantly share code, notes, and snippets.

@raazon
Last active July 15, 2019 11:17
Show Gist options
  • Save raazon/bfebbfb6824da41168143aeeb5ba7814 to your computer and use it in GitHub Desktop.
Save raazon/bfebbfb6824da41168143aeeb5ba7814 to your computer and use it in GitHub Desktop.
Increase limit of maximum file upload size. If .htaccess file method doesn't work for you then you may edit php.ini file, hope second one must work 😊
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /staging/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /staging/index.php [L]
</IfModule>
# END WordPress
# Increase Limit of Maximum upload file size
php_value upload_max_filesize 100M
php_value post_max_size 100M
php_value max_execution_time 300
php_value max_input_time 300
; Maximum execution time of each script, in seconds
; http://php.net/max-execution-time
; Note: This directive is hardcoded to 0 for the CLI SAPI
max_execution_time=300
; Maximum amount of time each script may spend parsing request data. It's a good
; idea to limit this time on productions servers in order to eliminate unexpectedly
; long running scripts.
; Note: This directive is hardcoded to -1 for the CLI SAPI
; Default Value: -1 (Unlimited)
; Development Value: 60 (60 seconds)
; Production Value: 60 (60 seconds)
; http://php.net/max-input-time
max_input_time=600
; Maximum amount of memory a script may consume (128MB)
; http://php.net/memory-limit
memory_limit=256M
; Maximum size of POST data that PHP will accept.
; Its value may be 0 to disable the limit. It is ignored if POST data reading
; is disabled through enable_post_data_reading.
; http://php.net/post-max-size
post_max_size=8000M
; Maximum allowed size for uploaded files.
; http://php.net/upload-max-filesize
upload_max_filesize=2000M
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment