How to increase Maximum Upload size in WordPress

WordPress is a famous website builder and CMS. It is one of the most flexible and easy to use software. Sometime we encounter this issue when uploading a bigger file, it doesn’t upload because it has a limited upload size. Here we will discuss possible methods to increase maximum upload size in WordPress.

How to increase Maximum Upload size in WordPress

Here we are going to Increase the Max Upload Size for your website.

Methods to increase Maximum Upload size in WordPress

  1. .htaccess file Method
  2. wp-config.php file Method
  3. Php.ini file Method
  4. function.php Method
  5. Contact Hosting Provider

You can use file manager from your hosting or you can use ftp client FileZilla also Before we go ahead please make sure you have your PHP version not set to “native” otherwise you will not be able to override PHP settings.

.htaccess file Method

To access .htaccess file in root folder, where your WordPress is installed. You can access your WordPress directory using FileZilla or File manager from your hosting. Using any code editor or Notepad, open .htaccess file and add the following lines.

php_value post_max_size 256M
php_value upload_max_filesize 64M
php_value max_execution_time 300

Set the value numbers as per your requirement.

Wp-config.php file Method

Navigate to your WordPress root directory, inside the folder you will find wp-config.php. Open this file using any code editor or Notepad and add following line of code at the bottom of the file.

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

Theme’s function.php Method

Navigation to your theme directory. Go to wp-content/themes/your-active-theme. Open function.php file and add following lines;

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

Check if it updates the Upload Max Size for you. Go to media library and upload a bigger file.

Php.ini Method

Go to where your WordPress is installed and look for php.ini file. It is possible that php.ini is not available there. One thing you can do is, go to your web hosting and look for PHP Settings open it and click save php settings now see if you can find the php.ini in WordPress installed directory. if you still cannot find the file now it is time to create one. Create a file and call it php.ini and add following lines.

upload_max_filesize = 64M
post_max_size = 64M
memory_limit = 15M

Contact Hosting Provider

If you are out of luck and none of above worked for you, you can just contact your hosting provider. All hosting provider have a support system contact them and tell them that you are not able to increase website upload max file size and they will be quick to fix it for you or tell you what you need to do.