Print

PHP memory_limit, max_execution_time and other tunables explained

  • mysql, phpmyadmin, php version, php memory limit, database backup, php tuning
  • 0

PHP performance tuning

Five PHP settings cause 90% of "white screen", "fatal error" or "request timed out" issues on WordPress and other CMS installs. Here is what each one does, the symptom you see when it is too low, and the value to set it to.

1. memory_limit

What it does: the most memory a single PHP request can use.

Symptom when too low: "Fatal error: Allowed memory size of 134217728 bytes exhausted" or a half-rendered page that ends abruptly.

Recommended: 256M for most WordPress sites, 512M for WooCommerce, 1024M for large multi-site setups.

2. max_execution_time

What it does: the longest a single PHP script can run before being killed.

Symptom when too low: long-running tasks (image processing, big CSV imports, plugin/theme update from a slow remote server) get cut off mid-way.

Recommended: 60 for normal sites; 300 if you do large imports. Web-server timeouts may still cap you, so very long jobs should run via WP-CLI / cron instead.

3. upload_max_filesize and post_max_size

What they do: max size of a single uploaded file, and max total size of one POST request.

Symptom when too low: "The uploaded file exceeds the upload_max_filesize directive in php.ini" when uploading images or themes.

Recommended: 64M for most sites, 256M if you upload videos or large theme zips. Set post_max_size slightly larger than upload_max_filesize.

4. max_input_vars

What it does: max number of input fields in a single POST.

Symptom when too low: WordPress menus with many items silently truncate when saving. WooCommerce variable products lose attribute combinations.

Recommended: 5000 (default is usually 1000).

5. max_input_time

What it does: longest a script can spend parsing input data (e.g. a multi-megabyte form upload).

Symptom when too low: uploads time out before they finish.

Recommended: 300 if you allow large uploads.

How to change them

cPanel → Select PHP VersionSwitch To PHP Options. Click any value to edit it inline. Save.

Open cPanel PHP Options Site still erroring? Get help

Need a hand?

The Trinico Cloud team is in South Africa and replies during local business hours. Reach us via WhatsApp, e-mail or a support ticket - whichever suits you best.

Contact us Open a support ticket


Was this answer helpful?

« Back
Loading