How to fix “WordPress memory exhausted” errors (Allowed memory size) Print

  • 0

Overview

This error happens when PHP reaches its memory limit. It usually appears when installing plugins, uploading media, or using heavy themes.

1. Increase memory limit in DirectAdmin

  1. Go to Select PHP Version
  2. Click Options
  3. Increase:
memory_limit = 512M
upload_max_filesize = 256M
post_max_size = 256M
max_execution_time = 300

2. Add WP_MEMORY_LIMIT to wp-config.php

define('WP_MEMORY_LIMIT', '512M');

3. Disable heavy plugins

Examples:

  • Elementor Pro
  • WooCommerce add-ons
  • Backup plugins running in background

4. Clear LiteSpeed cache

Sometimes cached PHP errors persist.

5. Check for infinite loops or broken plugins

If increasing memory limit does nothing, a plugin is stuck.

6. Verify your hosting plan limits

On CloudLinux, each plan has unique RAM limits.


Was this answer helpful?

« Back