Messages such as "The uploaded file exceeds the upload_max_filesize directive", "Allowed memory size exhausted" or a theme demo import that stops halfway all point to PHP limits. On MdmHost you change these yourself in cPanel, per PHP version, without editing server files.
Before you start
- Know which PHP version the site uses. It is shown in WordPress → Tools → Site Health → Info → Server.
- Decide reasonable values. Bigger is not always better: very high limits let one broken script use more of your account's resources.
The settings that matter
| Directive | Typical WordPress value | What it controls |
|---|---|---|
upload_max_filesize | 64M | Largest single uploaded file |
post_max_size | 64M or more | Total size of a form post, must be at least the upload size |
memory_limit | 256M | Memory one PHP request may use |
max_execution_time | 120 | Seconds a script may run |
max_input_time | 120 | Seconds allowed to receive input |
max_input_vars | 3000 | Form fields per request; large menus and page builders need more |
Change limits with Select PHP Version
- Log in to cPanel from MdmHost dashboard → Services.
- Open cPanel → Software → Select PHP Version.
- Click the Options tab.
- Click the value next to each directive and choose a new one from the list. Changes save automatically.
These settings apply to the PHP version selected for the account. If you later switch versions, check the options again.
Change limits with MultiPHP INI Editor
If your site uses a version managed by MultiPHP Manager, open cPanel → Software → MultiPHP INI Editor, choose Basic Mode, select the domain's location and edit the values, then click Apply. In Editor Mode you can add directives that are not listed.
Set the WordPress memory limit
WordPress has its own memory setting that can be lower than PHP's. Add to wp-config.php:
define( 'WP_MEMORY_LIMIT', '256M' );WordPress cannot use more than PHP's memory_limit, so change both.
Check the change worked
- Go to WordPress → Media → Add New. The "Maximum upload file size" line should show the new value.
- Open Tools → Site Health → Info → Server and check the PHP memory limit, max execution time and max input variables.
- Purge the LiteSpeed cache if an old value is still displayed.
Troubleshooting
- Value does not change: an old
php.inior.user.iniin the site folder overrides it, or.htaccesscontainsphp_valuelines. Remove them and use cPanel instead. - 500 error after editing .htaccess:
php_valuelines are not supported on this setup. Delete them. - Uploads still fail on large videos: upload through File Manager or FTP and use a plugin such as Add From Server, or host video on a streaming service.
- Imports still time out: run them with WP-CLI over SSH, which is not limited by web timeouts.
Limits you cannot raise yourself
PHP settings live inside the account's CloudLinux limits for CPU, memory and processes. Raising memory_limit to a value larger than the account's total memory allowance does not help: the process is stopped when the account limit is reached. If cPanel → Metrics → Resource Usage shows frequent faults, optimise the site (caching, fewer plugins) or ask support which plan fits the workload.
