Physical Address

304 North Cardinal St.
Dorchester Center, MA 02124

How to increase Upload Max Filesize

How to Increase Upload Max Filesize

Follow these steps to increase the maximum file size for uploads on your PHP or WordPress website:

  1. Locate or Create a PHP.ini File:
    • Find the php.ini file in your website’s root directory or in the /wp-admin folder. If it doesn’t exist, create a new file named php.ini in the appropriate directory.
  2. Modify File Settings:
    • Open the php.ini file and add or update the following lines with the desired limits:
      • upload_max_filesize=128M (Sets the maximum file size that can be uploaded)
      • post_max_size=130M (Should be larger than upload_max_filesize to accommodate file data plus any additional data)
      • memory_limit=256M (Should be larger than post_max_size to ensure adequate memory for processes)
      • max_execution_time=300 (Specifies how long (in seconds) a script is allowed to run)
      • max_input_time=300 (Defines the maximum time in seconds a script is allowed to parse input data, like file uploads)
  3. Adjust for Multiple File Uploads (If Necessary):
    • If you plan to upload multiple files at once, increase the max_input_vars setting:
      • max_input_vars=1000
  4. Save Changes:
    • After making the changes, save the php.ini file.
  5. Restart Web Server (If Required):
    • Depending on your hosting environment, you may need to restart your web server for the changes to take effect.

By following these steps, you can successfully increase the maximum file size for uploads on your website.

Leave a Reply

Your email address will not be published. Required fields are marked *