Select your language

What this error means

The message Allowed memory size of 536870912 bytes exhausted (tried to allocate ...) indicates PHP tried to use more memory than the configured memory_limit. It’s common across Joomla sites hosted worldwide — from shared servers in Pakistan to managed VPS in the UAE or Europe.

Quick fixes (try in this order)

Edit php.ini (preferred if you have access):

memory_limit = 768M
; or 1024M if needed

If you can't edit php.ini, try adding to .htaccess (Apache):

php_value memory_limit 768M

Note: some hosts disallow php_value in .htaccess. Use a php.ini or contact host if changes don't apply.

Add this near the top of configuration.php:

ini_set('memory_limit', '768M');

Useful when you can’t modify PHP settings directly — works globally.

  1. Turn on debug in Joomla System → Global Configuration → System → Debug System and enable maximum error reporting.
  2. Check error logs — server and Joomla logs — to locate memory-heavy extensions.
  3. Disable third-party plugins one by one, especially backup or import tools.

  • Keep Joomla and all extensions updated.
  • Use optimized hosting (PHP-FPM with higher memory allocation).
  • Reduce cron job load by batching imports.
  • Profile heavy scripts using Xdebug or PHP profiler.

Example: check current memory limit

Create a small PHP file phpinfo-memory.php and open it in your browser to confirm:

<?php
phpinfo();
?>

Search for memory_limit on that page to verify your new limit.

When to contact your host

If none of the methods work, your host might enforce a hard memory cap. Contact support and share the full error — they can increase your PHP memory limit or recommend a higher-tier plan.

Abdul Waheed - Joomla Expert
Abdul Waheed

Joomla Developer & PHP Expert helping businesses worldwide fix Joomla errors and optimize performance. Based in Pakistan, serving clients globally including the UAE, USA, UK, and Europe.

Hire Me for Joomla Support

This guide is written by Abdul Waheed (Joomla expert).