Free VPS Trial, no credit card required
Learn More
NetShop logo

Home

Blog

How to Increase the Maximum File Upload ...

How to Increase the Maximum File Upload Size in WordPress (6 Easy Ways)

How to Increase the Maximum File Upload Size in WordPress (6 Easy Ways)

Published on Fri Apr 02 2021

WordPress is a powerful CMS used by millions of websites. Whilst its easy to get a WordPress website up and running, you may end up with the common problem of not being able to upload large files and media.

By default, the maximum upload size in WordPress is 2MB, although this value may vary among web hosting providers. To check what is the current max upload size limit in your WordPress website, do the following:

  1. Login to your WordPress admin area (WP Admin)
  2. From the left-side menu, navigate to Media > Add New
  3. You should see the value of max upload file size setting as shown in the screenshot below
How to check max upload file size in WordPress

If the current upload size limit does not meet your needs then you can continue reading this article where we will show you 6 easy ways of how to increase the maximum file upload size in WordPress.

1. Edit the .htaccess file

To access the .htaccess file you will need to connect on your hosting environment via FTP client, such as Filezilla, and navigate to the folder where WordPress is installed. Open the .htaccess file in your preferred code edit, or simply with Notepad, and add the following lines.php_value upload_max_filesize 64M

php_value post_max_size 128M
php_value memory_limit 256M
php_value max_execution_time 300
php_value max_input_time 300

The above lines will define the max upload size in megabytes so feel free to adjust the numbers as per your needs.

2. Edit Functions.php file

If you are not able to access or edit the .htaccess file then there is an alternative option.

Increase the size limits of max upload file size by adding the following lines in the functions.php file of your theme.

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

Important: If you update your theme the above changes will be gone, so make sure you add them again after you update your theme or install a new one.

3. Edit settings in php.ini file

Changing the upload max filesize and increasing the memory limit can also be done through the php.ini file. In fact, this is one of the most common ways of doing this.

With the help of an FTP client (or SSH for those who have more experience) access the root directory of your WordPress site and look for the php.ini file. If you cannot find it then you will need to create it first.

Open any text editor and create a new file with the following lines of code. Once done save the file and upload it back to the root of your WordPress directory.

upload_max_filesize = 25M
post_max_size = 13M
memory_limit = 15M

4. Edit wp-config.php file

Another way of increasing the upload size in WordPress is to define the size parameter in the wp-config.php file. To do that, access your WordPress root directory using SSH or FTP and locate a wp-config.php file.

Open the file in any text editor and add the following code.

@ini_set( 'upload_max_size' , '20M' );
@ini_set( 'post_max_size', '13M');
@ini_set( 'memory_limit', '15M' );

Save your changes and it should increase your file upload size.

5. Use the Increase Max Upload Filesize Plugin

If you are not familiar with server-side commands and therefore not confident to use any of the above options, there is a WordPress plugin available that will help you get the job done easily.

The plugin’s name is  Increase Max Upload Filesize. To get this plugin installed please follow the steps below:

  1. Login to your WordPress Admin area
  2. From the left-side menu go to Plugins > Add new
  3. Search for “Increase Max Upload Filesize”, then install and activate it.
  4. Once activated, go to the plugin’s settings and simply enter your desired value for upload size. An example is shown in the screenshot below.
How to change the upload maximum file size with the WordPress plugin

6. Contact your Web Hosting Provider

Since this change is considered to be server-side, you can always contact your web hosting provider to do this change on your behalf.

If you have a web hosting account with NetShop ISP then we can help you free of charge as all our web hosting customers enjoy the privileges of fully managed web hosting. This means that you can contact us at any time with any technical or WordPress-related support and we will assist you without extra charges.

Share this article

Recent Posts

Promo: How to Get Cloud & Server Hosting for Free with NetShop ISP

Promo: How to Get Cloud & Server Hosting for Free with NetShop ISP

April 08, 2021

Benefits of Malta VPS Hosting

Benefits of Malta VPS Hosting

April 07, 2021

Is Free Unlimited Hosting Secure?

Is Free Unlimited Hosting Secure?

April 05, 2021

How to Increase the Maximum File Upload Size in WordPress (6 Easy Ways)

How to Increase the Maximum File Upload Size in WordPress (6 Easy Ways)

April 02, 2021

How to choose the best Reseller Web Hosting

How to choose the best Reseller Web Hosting

March 31, 2021