Increase WordPress Maximum File Upload Size

Do you need more space to upload your files? Sometimes in WordPress, you want to upload a file and you get an error. So what is the solution? In this article, we will show you how to increase the maximum upload file size in WordPress with three methods.

We’re gonna teach you how to increase WordPress maximum file upload size in three methods so you can do it with any methods that you are comfortable with that.

Check WordPress Maximum File Upload Size

Before changing your maximum file upload size you can check your website’s maximum file upload size you can check you upload limit. To do this you need to go to the WordPress admin dashboard and click on Media->Add New. WordPress will show you your upload limit on your website.

WordPress Maximum Upload Size
WordPress Maximum File Upload Size

Remember before editing anything you should make a backup from your website to make sure there will be no problem.

Theme Method ( functions.php )

Your WordPress theme has a file called functions.php. One of the methods by that you can change your maximum file upload size is using the theme. For doing this you need to open your functions.php in an editor like VSCode or your OS default text editor. If you want to do this with your web hosting control panels like CPanel or DirectAdmin is possible. In the following, we’ll show this. Well with any method that you want to do this finally you should add this code to your functions.php.

@ini_set( 'upload_max_size' , '64MB');
@ini_set( 'post_max_size' , '64MB' );
@ini_set( 'max_execution_time' , '300' );
  • upload_max_size: This defindes maximum file size to upload.
  • post_max_size: This defindes maximum size for any request.
  • max_execution_time: This sets the maximum time in seconds a script is allowed to run before it is terminated

.htaccess File

.htaccess file is another method to increase your upload limit. This file is located in your root directory like this public_html/.htaccess. Edit the htaccess file and enter this code.

php_value upload_max_filesize 64M
php_value post_max_size 64M
php_value max_execution_time 300
php_value max_input_time 300
  • upload_max_size: This defindes maximum file size to upload.
  • post_max_size: This defindes maximum size for any request.
  • max_execution_time: This sets the maximum time in seconds a script is allowed to run before it is terminated
  • max_execution_time: This sets the maximum time in seconds a script is allowed to parse input data, like POST and GET.

Usign the Plugin

If you don’t know about codes or files don’t worry. We’re going to teach you to increase maximum uploading file size via a plugin called Increase Maximum Upload File Size. Go to the WordPress admin dashboard and click on Plugins->Add New and search the Increase Maximum Upload File Size and install it and then activate the plugin.

Increase Maximum Upload Size Plugin
Increase Maximum Upload Size Plugin

After activating the plugin you have a new option in the Settings menu called Increase Maximum Upload File Size. Click on it to see the settings of the plugin.

Maximum Upload File Size Settings
Maximum Upload File Size Settings

Click on the select box and change choose your maximum file upload size.