How To Increase post_max_size & upload_max_size in cPanel? cPanel 

  • Thread starter KristinaW
  • Start date
KristinaW

KristinaW

New Member
Joined
May 7, 2021
Messages
9
Points
3
  • #1
I have had a few friends try to upload some photos to my new XenForo forum and they tell me that they're getting an error message that says something like the max upload size is too small. Is there a way that I can increase the settings so people can upload larger images to my site? Right now, it seems to be very small. I need it at least 20MB. Can I access these settings through cPanel or do I need to use the command prompt? I'd rather not use the command prompt since I have cPanel at hand.
 
KodyWallice

KodyWallice

New Member
Joined
May 7, 2021
Messages
9
Points
1
  • #2
You basically need to edit your php.ini file. PHP comes installed with limitations built into it so errant scripts don't hog so much in the way of resources that they bring the entire server down. If you wanted to try to tackle this via the command prompt, you can take a quick look at these two resources:

https://mediatemple.net/community/products/dv/204404784/how-do-i-increase-the-php-upload-limits
https://mediatemple.net/community/products/dv/204403894/how-can-i-edit-the-php.ini-file

Since you've got cPanel running on your server or hosting account though, follow these instructions:

1. Log into your cPanel account.

2. Once inside, scroll down to the Software section and click the MultiPHP INI Editor link.

multiphp-ini-editor-link-cpanel.gif

3. When you reach the next page, choose your location, or website you'd like to edit, from the drop down box. This drop-down is directly under the Configure PHP INI Basic Settings heading.

4. Once that choice has been made, you'll see a bunch of settings. Both of the ones you want to change should be set to 2MB by default. For most websites, that's way too small (not only for XenForo forums, but WordPress blogs and websites as well). The two settings you're interested in changing are post_max_size and upload_max_filesize.

5. Edit the referenced fields and instead of 2MB, increase the values to 20MB.

cpanel-php-ini-settings-post-max-size.gif

6. When finished, click the Apply button down at the bottom of the page to apply the change in settings. When you now look at the homepage of your XenForo admin panel, you should see that those two values have been changed.

xenforo-server-environment-report.gif
 
How To Increase post_max_size & upload_max_size in cPanel? was posted on 05-19-2021 by KristinaW in the Servers & Hosting forum.

Search

Looking for an all-around awesome forum? Check out IndyFor!
Top