How to increase the maximum file upload size limit in PHP?

  WHM

Introduction:

By default, cPanel sets the maximum file upload size to 2MB. Follow this guide to increase the upload limit

Prerequisite:

WHM root credentials.

Procedure:

Step1:

Log into WHM.

Step2:

Navigate to “MultiPHP INI Editor”

Step3:

Select the version of PHP that your site uses.

Step4:

Increase the following variables

  1. upload_max_filesize
  2. post_max_size (This should be larger than or equal to upload_max_filesize)
  3. memory_limit (This should be larger than or equal to post_max_size)
  4. max_execution_time (Optional, but can prevent timeout errors for large files)

Step5:

Click “Apply”

LEAVE A COMMENT