How to Increase the Maximum File Upload Size in WordPress

There are a couple of ways to increase the maximum upload size and maximum execution time of php in a WordPress running site. Here are a couple of ways you can try:

Through wp-config:

wp-config.php can be found inside the WordPress root folder:
wpconfig

You can open it and add these lines at the end of it:

@ini_set( 'upload_max_size' , '1G' );
@ini_set( 'post_max_size', '1G');
@ini_set( 'max_execution_time', '900' );

Through php.ini:

We configure php.ini file to increase the maximum upload size of the files. You need to look for these lines inside the php.ini and adjust them to your needs:

upload_max_filesize = 2G
post_max_size = 2G
max_execution_time = 900

Through htaccess:

WordPress comes with an .htaccess file inside its root folder:
ht
We can edit this file to increase the maximum upload size in WordPress. Here are the lines you need to add at the end of .htaccess file:

php_value upload_max_filesize 1G
php_value post_max_size 1G
php_value max_execution_time 900
php_value max_input_time 900