> ## Documentation Index
> Fetch the complete documentation index at: https://kb.verpex.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Maximum Upload Filesize and how to Increase it

What Is “upload\_max\_filesize”?

"upload\_max\_filesize" is a PHP configuration setting that specifies the maximum size of a file that can be uploaded to a server. This setting is used by PHP to limit the size of uploaded files to prevent the server from running out of memory or disk space. The value of the "upload\_max\_filesize" setting is expressed in bytes, but can also be defined in megabytes or gigabytes by appending the letter **M** or **G** respectively.

When updating upload\_max\_filesize, you must put into consideration other directives

* post\_max\_size, which must be larger than upload\_max\_filesize.
* memory\_limit, which should be larger than post\_max\_size.

For example, if the "upload\_max\_filesize" is set to 128M, it means that the maximum size of a file that can be uploaded is 128 megabytes. If you upload a file that is larger than this limit, you will receive an error message indicating that the file is too large.

To increase the upload max filesize on cPanel, you can follow these steps:

* Login to your cPanel account
* Go to the **Software** section and click on **Selecet PHP Version**
* Find the **upload\_max\_filesize** option and increase its value to the desired value (e.g. 64M)
* Click on the **Apply** button to save the changes.

  For the new change to be reflected, this value should be at least as big as the post\_max\_size.\
  You can also increase the upload max filesize by adding the following code to your .htaccess file:

```text theme={null}
php_value upload_max_filesize 64M
```

It is important to set the "upload\_max\_filesize" value appropriately to ensure that your server can handle the size of uploaded files without running into performance or stability issues.
