Learn How to Increase the Maximum Upload Size on WordPress

How to Increase the Maximum Upload Size on WordPress

Got Stuck, while uploading a file on WordPress? Don’t worry In this article we are going to learn how to increase the maximum upload size on WordPress.

Check the current maximum upload size:

To check WordPress current maximum upload size, go to WordPress dashboard and click media as the image given below.

We can increase the WordPress maximum upload size whatever we want by following methods:

  1. php.ini
  2. .htaccess
  3. wp-config.php
  4. functions.php
  5. Plugin
  6. Contact Support

Step 1: php.ini

Connect your server via ssh or FTP, then enter to the root directory of your WordPress and search the PHP.ini file, if file not exists, create one, then copy and paste the following code to increase the maximum upload size on WordPress via PHP.ini file.

upload_max_filesize = 50M
post_max_size = 50M
max_execution_time = 300

Save the file and check maximum upload size.

Step 2: .htaccess

Open the .htaccess file which is on your WordPress root directory, then copy and paste the following code to increase the maximum upload size on WordPress via a .htaccess file.

php_value upload_max_filesize 50M
php_value post_max_size 50M
php_value max_execution_time 300
php_value max_input_time 300

Save the updated file then check the size.

Step 3: wp-config.php

To increase the maximum upload size on WordPress via a wp-config.php file, enter the WordPress root directory, then open the wp-config.php file, copy and paste the following code.

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

Save the wp-config.php file then check the changes.

Step 4: functions.php

Warning: Editing functions.php may cause website down, be careful and edit the functions.php file.

On WordPress dashboard click the Appearance>theme editor, open the functions.php file, copy and paste the following code.

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

Save changes and check the maximum upload size.

Note: When update or changing the theme, the maximum upload size of WordPress will be automatically changes to it its default size.

Step 5: Plugin

We can increase the maximum upload size on WordPress via a plugin. Go to your WordPress dashboard and click plugins>add new, type, and search the Increase Maximum Upload File Size plugin then install and activate the plugin, you can increase the maximum upload size whatever you want on plugin settings as the image below.

Save changes, check and upload the file.

Step 6: Contact Support

If the above steps are not solved your maximum upload size issue, immediately contact your hosting provider. They can solve it.

Conclusion:

In this WordPress troubleshooting tutorial we have learned how to increase the maximum upload size on WordPress, hope this helps.

Leave a Reply

Your email address will not be published. Required fields are marked *

You May Also Like