How To Increase WordPress Upload Size

Are you unable to upload files to your WordPress website due to low file upload size?

In this article, we will share different methods to increase the file upload size on your WordPress website.

How to find your current maximum file upload size

To find your current maximum file upload size, visit Media -> Add New from your admin dashboard. In the bottom you will see a Maximum upload file size: followed by the size of file you can upload. If you are going to upload files larger than that then read further to increase the file upload size.

Increasing the WordPress file upload size

The maximum file upload size can be increased in many ways. We are going to cover a few different methods below.

Increasing through the theme’s Functions file

Edit the theme’s functions.php file and add the below code.

@ini_set( 'upload_max_size' , '64M' );

@ini_set( 'post_max_size', '64M');

@ini_set( 'max_execution_time', '300' );

Replace the 64M with your desired upload size.

Though this is the easiest method to increase the file upload size, whenever you change your theme, you will have to again add the above codes to increase the file upload size.

Increasing through the PHP.INI file

Using FTP, navigate to your website’s root folder. Locate the php.ini file. If you don’t find any then create a file in the root folder and name it php.ini. The php.ini file is used to configure applications running on the PHP language.

Add the below lines of code to the php.ini file.

upload_max_filesize = 64M

post_max_size = 64M

max_execution_time = 300

memory_limit = 15M

Increasing through the wp-config file

Another way of increasing the file size is through the wp-config.php file. Using FTP, navigate to the root folder of your website. Locate the wp-config.php file and add the below lines of code to it.

@ini_set( 'upload_max_size' , '64M' );

@ini_set( 'post_max_size', '64M');

@ini_set( 'memory_limit', '15M' );

Save the changes and the file size should now be increased on your WordPress website.

Increasing through the .htaccess file

This method should only be used by people who have advanced technical knowledge as messing the code in the .htaccess file can break your website.

Using FTP, navigate to the root directory of your WordPress installation. Locate the .htaccess file and edit it. Add the below lines of code in it and save the file.

php_value upload_max_filesize 64M

php_value post_max_size 64M

php_value max_execution_time 300

php_value max_input_time 300

Note: Some of the above methods may not work if you are hosting on a shared plan. Many web hosts restrict the max file upload size and you will have to either upgrade your plan or ask the web host to increase the max file upload size.

Have questions or confused about something WordPress Related? Join Our Discord Server & ask a Question

Leave a Comment

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

Scroll to Top
Scroll to Top