How To Increase the PHP Max_Upload_Filesize In cPanel

max upload filesize

There are some circumstances that might require making some slight changes in your PHP setting/configuration. These circumstances could come up when you are running an application, plugins, or scripts or maybe you are even uploading a file via PHP. At times, it could be that you have exceeded the default limitations set by your hosting provider.

This content will teach you how to resolve the error by increasing the limit of upload_max_filesize from your cPanel.

The PHP act as a guard that protects a server’s performance by placing a limit on file upload sizes.

They are several ways of increasing the PHP upload limit, these could be done by making changes in the PHP configuration files or other ways you will learn in this blog post.

What Is “upload_max_filesize” in PHP?

The upload max filesize directive is a PHP variable that is set in the system, local, and user.ini files. These determine the baseline configuration of the PHP interpreter. By default, the upload_max_filesize limit is set to 2Mb, which means that you will have to change it if you want to upload bigger files via PHP.

You might also consider adjusting these other directives too:

  • Post_max_size, which is always supposed to be larger than the upload_max_filesize.
  • Memory_limit, which is supposed to always be larger than the post_max_size.

PHP directive values are displayed in bytes. Therefore, if you change the upload_max_filesize to 2000, that means that the maximum size of files that can be uploaded is 2000 bytes. Keep in mind that you can also use short bytes values like K, M, and G which represent kilobytes, megabytes, and gigabytes respectively. Therefore, 1000M stands for 1000 Megabytes while 10G stands for 10 gigabytes.


How to Increase the PHP Max_Upload_Filesize from your cPanel

In simple steps, Login to your cPanel and navigate to the “Software” section, and click on “Select PHP Version”

Software section in cpanel:

Now, click on the options

php selector

Then navigate to where you can see upload_max_filesize and change it to the value you want or the value that is available for your plan.


That is all, If you follow these steps and increase the upload_max_filesize value, the error should be resolved instantly. If you need additional information or suggestion, you can drop them in the comment section.

If the error continues, contact our customer support, if you are hosting with Harmon Web.

Leave a Reply

One thought on “How To Increase the PHP Max_Upload_Filesize In cPanel

  1. […] of the issues you will run into when using WordPress for your website is the PHP memory limit. This issue is usually common among new WordPress […]