Skip to content

Instantly share code, notes, and snippets.

@guiwuff
Last active May 5, 2017 10:13
Show Gist options
  • Save guiwuff/e17269a0efd248d3734aa0500d6bb101 to your computer and use it in GitHub Desktop.
Save guiwuff/e17269a0efd248d3734aa0500d6bb101 to your computer and use it in GitHub Desktop.
Maximum Upload Size in Wordpress

Maximum Upload Size in Wordpress

Put or modify php.ini in your root wordpress installation directory (eg. public_html/)

upload_max_filesize = 64M
post_max_size = 64M
max_execution_time = 300

Or put these inside functions.php theme file wp-content/themes/themes-folder-name/functions.php

@ini_set( 'upload_max_size' , '64M' );
@ini_set( 'post_max_size', '64M');
@ini_set( 'max_execution_time', '300' );

Some webhost allow changes via .htaccess in root directory

php_value upload_max_filesize 64M
php_value post_max_size 64M
php_value max_execution_time 300
php_value max_input_time 300
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment