Changing Maximum Upload File Size in php.ini and .htaccess Print

  • 0

In this guide, we’ll explore different methods to adjust the maximum upload file size for WordPress and other PHP applications. This involves modifying the upload_max_filesize and post_max_size settings in both the php.ini file and the .htaccess file.

When to Adjust Maximum Upload File Size

You might need to increase the maximum upload file size for various reasons, especially when installing WordPress themes and plugins that require larger file sizes than the default settings in cPanel.

Adjusting in php.ini

Using Basic Mode:

  1. In cPanel, navigate to the Software tab and select MultiPHP INI Editor.
  2. Choose Basic Mode and select your domain.
  3. Enter your desired values for both post_max_size and upload_max_filesize, then click Save.

Using Editor Mode:

  1. In cPanel, go to the Software tab and select MultiPHP INI Editor.

  2. Switch to Editor Mode and select the domain you wish to modify.

  3. Add the following lines, replacing XX with your desired megabyte value:

     
    php_value upload_max_filesize XXM php_value post_max_size XXM

    For example:

     
    php_value upload_max_filesize 582M

This sets the maximum upload size to 582MB.

Editing in .htaccess

If you prefer to modify the .htaccess file directly, follow these steps:

  1. Go to File Manager and locate the .htaccess file.

  2. Add the following lines, again replacing XX with your chosen value:

     
    php_value post_max_size XXM php_value upload_max_filesize XXM

    For example:

     
    php_value upload_max_filesize 582M

Conclusion

Both methods above will effectively adjust the maximum upload file size. If you continue to experience issues, please log in to your hosting account and submit a support ticket for assistance.


Was this answer helpful?

« Back