Applies to: All plans.
Before you start: You will need access to your cPanel (open your service in the client area and use Log in to cPanel), and you should know which domain runs the WordPress site you want to change.
Seeing "the uploaded file exceeds the upload_max_filesize directive", "Allowed memory size exhausted", or a theme or plugin that asks for more memory? These are PHP limits, and you can raise them yourself. The three settings that matter are memory_limit (how much memory PHP can use), upload_max_filesize (the biggest single file you can upload) and post_max_size (the total size of a form submission, which must be at least as large as your upload limit).
The easiest, most reliable way is cPanel's INI editor, because it survives WordPress and plugin updates.
Raise the limits in cPanel (recommended)
- Log in to cPanel.
- Open Software -> MultiPHP INI Editor.
- At the top, choose the domain running your WordPress site from the dropdown.
- Stay on the Editor Mode (basic) view, which lists common directives.
- Set sensible values, for example:
-
memory_limit =
256M -
upload_max_filesize =
64M -
post_max_size =
64M
-
memory_limit =
- Click Apply (or Save).
Result: The new limits take effect immediately. In WordPress, open Tools -> Site Health -> Info -> Server (or Media -> Add New) and confirm the maximum upload size has increased.
Keep post_max_size equal to or larger than upload_max_filesize, otherwise your uploads will still be blocked.
Alternative: edit wp-config.php or .user.ini
If you prefer to set memory inside WordPress, add this line to wp-config.php (via cPanel -> Files -> File Manager, above the line that says /* That's all, stop editing! */):
define( 'WP_MEMORY_LIMIT', '256M' );
For upload and post sizes, you can instead create or edit a .user.ini file in your site's root folder:
upload_max_filesize = 64M
post_max_size = 64M
memory_limit = 256M
A .user.ini change can take a few minutes to apply because PHP caches it. The MultiPHP INI Editor method above changes the same settings without the wait.
Stay within your plan's limits
These PHP values are not unlimited. Your account runs inside a CloudLinux container, and the real ceiling is your plan's physical memory (PMEM) allowance — roughly 768 MB on Self-Managed Lite, 1 GB on Self-Managed Plus and Managed Starter, 1.5 GB on Self-Managed Pro and Managed Growth, and 2 GB on Managed Business. Setting memory_limit higher than your PMEM will not give you more memory; PHP simply cannot exceed what your container allows. If a process needs more than your plan provides, the right fix is to upgrade. See Understanding CloudLinux resource limits (LVE).
Troubleshooting this task
- The upload limit did not change. Check you selected the correct domain in MultiPHP INI Editor (settings are per-domain). If you edited .user.ini, wait a few minutes for PHP to reload it.
- Uploads still fail at the new size. Make sure post_max_size is at least as large as upload_max_filesize.
- You changed wp-config.php but got the white screen. Recheck the file for a typo or a missing semicolon. See Fixing the WordPress white screen of death.
- You hit "Resource limit reached" or a 508 error. You are bumping against your CloudLinux limits, not a PHP setting — reduce usage or upgrade. See "Resource limit reached" and 508 errors explained.
Comments
0 comments
Please sign in to leave a comment.