How to Use cPanel to Increase WordPress Upload Size Limits
How to Use cPanel to Increase WordPress Upload Size Limits
Why Increase WordPress Upload Size Limits?
By default, WordPress has a file upload size limit that can be quite low (e.g., 2MB or 8MB), which can restrict uploading large media files, themes, or plugins. Increasing this limit allows you to upload bigger files without errors.
Methods to Increase Upload Size via cPanel
There are several ways to increase the upload size limit. The most common methods using cPanel include editing the php.ini
file, using .htaccess
, or modifying wp-config.php
.
Step 1: Check Your Current Upload Size Limit
- Login to your WordPress dashboard.
- Go to Media > Add New.
- Check the maximum upload file size shown below the upload box.
Step 2: Increase Upload Size via cPanel’s MultiPHP INI Editor
- Login to your hosting cPanel.
- Find the MultiPHP INI Editor under the Software section.
- Select your domain from the dropdown.
- Locate and edit the following settings:
upload_max_filesize
– increase to desired size (e.g., 64M)post_max_size
– increase to match or exceed upload_max_filesize (e.g., 64M)memory_limit
– set to a higher value if necessary (e.g., 128M)
- Click Apply or Save to update the settings.
Step 3: Increase Upload Size by Editing php.ini (if MultiPHP INI Editor isn’t available)
- In cPanel, open the File Manager.
- Navigate to the root folder of your WordPress installation, usually
public_html
. - Look for a
php.ini
file. If not present, create a new file and name itphp.ini
. - Edit the file and add or update the following lines:
upload_max_filesize = 64M post_max_size = 64M memory_limit = 128M
- Save the changes.
Step 4: Update .htaccess File (Alternative Method)
- In cPanel File Manager, locate and edit the
.htaccess
file in your WordPress root directory. - Add the following lines at the top or bottom:
php_value upload_max_filesize 64M php_value post_max_size 64M php_value memory_limit 128M
- Save the file.
Note: This method works only if your server uses Apache and allows overriding PHP settings via .htaccess.
Step 5: Edit wp-config.php to Increase Memory Limit (Optional)
- In the File Manager, open
wp-config.php
located in the root WordPress folder. - Add this line before the
/* That's all, stop editing! Happy blogging. */
comment:define('WP_MEMORY_LIMIT', '128M');
- Save changes.
Step 6: Verify Changes
Return to your WordPress dashboard, go to Media > Add New, and check if the upload size limit has increased.
Troubleshooting Tips
- If limits don’t update, clear your browser cache and WordPress cache plugins.
- Contact your hosting provider if the changes are not taking effect—some hosts restrict these settings.
- Ensure there are no conflicting settings in other
php.ini
or.user.ini
files.
Conclusion
Using cPanel to increase your WordPress upload size limits is a straightforward process that allows you to upload larger files such as themes, plugins, and media without errors. By adjusting PHP settings through cPanel tools, you ensure your website remains flexible and functional.