There was a problem loading the comments.

Fix “Allowed memory size exhausted” (PHP memory limit) on GARMTECH Hosting

Support Portal  »  Knowledgebase  »  Viewing Article

  Print

The error below means that PHP ran out of allowed memory while executing a script:

PHP Fatal error: Allowed memory size of X bytes exhausted (tried to allocate Y bytes)

On GARMTECH hosting, the most common causes are heavy WordPress plugins/themes, large imports, or scripts that load too much data into memory.

1) Confirm where the error happens

  • In Plesk, open Websites & Domains → select your domain → Logs and check the error log around the time of the issue.
  • If it is a WordPress website, you can also enable WordPress debugging (temporary) to capture the exact error.

2) Increase PHP memory_limit in Plesk

  1. Log in to Plesk.
  2. Go to Websites & Domains → your domain.
  3. Open PHP Settings.
  4. Find memory_limit and increase it (common values: 256M or 512M).
  5. Click Apply (or save changes).

Note: your hosting plan may have limits. If you cannot set the value you need, you may need to optimize the website or upgrade the plan.

3) Check for overrides (.user.ini / .htaccess / wp-config.php)

Sometimes the value is overridden by per‑directory settings:

  • .user.ini (often contains memory_limit=...)
  • .htaccess directives (LiteSpeed supports common Apache-style directives)
  • wp-config.php (WordPress can define WP_MEMORY_LIMIT)

If you changed memory_limit in Plesk but the error continues, search your website files for memory_limit and remove conflicting settings.

4) Reduce memory usage (recommended)

  • Update WordPress core, plugins and theme.
  • Temporarily disable recently added plugins and test again.
  • Avoid importing huge files in one step (split imports when possible).
  • Optimize images and database if the site is very large.

5) If the error happens during a one-time task

For large operations (imports, backups, migrations) it can be more reliable to run them via CLI (SSH) or on a VPS where you control server limits.


Share via
Did you find this article useful?  

Related Articles


Comments

Add Comment

Replying to  

Tags

© GARMTECH