WordPress only allows us to upload 2M file defaultly. Here is an example:
However, if you plan to upload large file, how to do? In this tutorial, we will introduce you 3 ways to increase the maximum file upload size in WordPress.
Method 1: Edit .htaccess
You can add code below in your wordpress .htaccess file.
# END WordPress php_value upload_max_filesize 512M php_value post_max_size 512M php_value max_execution_time 300 php_value max_input_time 300
In this method, we will make wordpress upload 512M file.
We have tested this method, it works. Here is an example:
Method 2: Edit wordpress theme functions.php
We can paste code below to make wordpress be able to upload 512M file.
@ini_set( 'upload_max_size' , '512M' ); @ini_set( 'post_max_size', '512M'); @ini_set( 'max_execution_time', '300' );
Method 3: Edit php.ini file
We also can eidt php.ini file to change the wordpress upload size limitation.
Here is an example:
memory_limit=1024M post_max_size=512M upload_max_filesize=512M max_execution_time=300 max_input_time=300
You should notice: we may need to restart apache to make php.ini works.