6 December

How to Increase the Upload Limit of the File Size in WordPress?

upload limit of the file size

If you’re having a WordPress website, you need to upload media files frequently to keep your website fresh and active. If the upload limit is very low on your web hosting solution, it can show “Your files to exceed the maximum upload size for this site” error and prevent you from uploading files in your media gallery or installing large-sized themes or plugins. In this article, we are going to discuss how to increase the upload limit of the file size in WordPress.

Generally, there are three ways to upload files in WordPress:

  • Log into your hosting solution provider by accessing their online file manager
  • Connect to your web server through an FTP client like FileZilla.
  • Upload your media, plugin, or theme file directly from the WordPress admin panel

However, due to the upload file limit in WordPress, uploading large-sized files can be a big problem. While there are many ways to increase the maximum upload file size in WordPress, we will be using three settings within PHP to deal with the upload limit of the file size in WordPress.

Below we have defined the settings to help you understand what we are doing:

  • upload_max_filesize

The maximum upload limit for files.

  • post_max_size

The maximum upload limit is handled in a POST request.

  • memory_limit

Memory allocated for PHP. This number should be equal to or more than the upload_max_filesize.

For example, if you have a 20MB file, you can set the upload_max_filesize to 25MB, post_max_filesize to 27MB, and memory_limit to 30MB.

Below are the steps you need to follow to increase the upload limit of the file size in WordPress. Based on your web server, any one of the ways should work! If you’re a newbie, it’s wise to hire WordPress experts for WordPress technical support services.

Tips on Increasing the Maximum File Size Upload Limit in WordPress

Create Or Modify PHP.ini File

PHP.ini stores the PHP configuration for your web server. This can be found in the root directory of your server. Navigate to your hosting root directory to find the php.ini file. It might be hidden due to security reasons, so make sure to check “Show hidden files”.

Open the php.ini file with your preferred text editor and then search for the three settings to adjust them as per your requirement.

Here’s an example:

File size to be uploaded: 20MB

  • upload_max_filesize = 25MB
  • post_max_size = 27MB
  • memory_limit = 30MB

If you can’t find the php.ini file, you can create it with a Right-Click of your mouse and choose Add New File. Now, open the new file and paste the above-mentioned three lines and save it as php.ini.

Sometimes the name of your web server’s php.ini file is php5.ini. So, do not get confused between the two.

Create Or Modify .Htaccess

 .htaccess is a file that contains various configurations for your web server. However, most hosting service providers keep it hidden. For modifying it, you need to check “Show Hidden Files” again and search for the .htaccess file within the root directory of your web server.

Open it with any text editor and paste the below three lines at the end of the file where it says #END WordPress:

  • php_value upload_max_filesize 25MB
  • php_value post_max_size 27MB
  • php_value memory_limit 30MB

If you can’t find the .htaccess file, you can build one and paste the default WordPress .htaccess file attributes and paste the above-mentioned three lines to maximize the upload file limit.

Modify a WordPress File

If both the methods described above don’t work for you, you can always have other options. You can paste the following three lines within your WordPress files. You can write these lines in wp-config.php, themes functions.php file, etc.

However, this is not a good way to increase the upload file size limit in WordPress.

  • @ini_set( ‘upload_max_size’ , ’25MB’ );
  • @ini_set( ‘post_max_size’, ’27MB’);
  • @ini_set( ‘memory_limit’, ’30MB’ );

If things seem difficult, you can hire WordPress experts for WordPress technical support services and solutions.

Directly from the Platform

Some WordPress hosting solutions like Cloudways come with a built-in feature to change the file size maximum limit. If you choose Cloudways as your hosting solution, then here’s how you can change directly from the platform.

From the bar on the top, go to servers and then to your preferred server. Go to Settings & Packages from the left pane and then you will find Upload Size under the basic settings tab. You can change as per your requirement, for example, you can add 25MB.

If you’re a newbie, you can partner with a WordPress agency that can take care of all these hassles for you.

Use Plugins

If you don’t prefer to do it manually, you can always use a WordPress plugin to make things easier. As WordPress plugin developers keep on developing plugins and contribute to the WordPress repository, you can find thousands of plugins for every purpose.

You only need to find the appropriate plugin that is compatible with your latest WordPress version. You can use the Increase Upload Max Filesize plugin that is compatible with the latest WordPress version.

Reach Out to Your Hosting Provider

Last but not the least, you can ask your hosting solution provider to maximize the file size upload limit on your WordPress website. The hosting solution providers generally offer 24×7 support service and you can overcome your challenges in no time.

Wrapping Up

So, these are some of the ways you can increase the upload limit of file size in WordPress. If you need any kind of technical assistance for your WordPress website, you can hire WordPress experts from us today.

As a professional WordPress agency, we offer a comprehensive range of WordPress development services at an affordable price range. Share your requirements with us today.

Frequently Asked Questions

Q.1. How do I test my WordPress website’s performance?

Ans. You can use these three tools to check your website’s performance:

  • Pingdom Tools to check your site’s speed
  • PageSpeed Insights to analyze your website’s current optimization
  • Load Impact to stress test your website

You can always hire WordPress experts who can help you boost your WordPress website’s speed and performance.

Q.2. How do I analyze my WordPress website?

Ans. WordPress does not have built-in analytics. So, you need to integrate Google Analytics into your WordPress website. However, beginners may find it quite difficult to integrate. An easier way to link Google Analytics with WordPress is through a plugin like MonsterInsights.

Have More Questions? Do Not Hesitate to Ask Our WordPress Experts Right Away!

Looking for Reliable WordPress Technical Support Services?