Or copy link
Struggling with “Fatal error: Allowed memory size of X bytes exhausted” in WordPress? This guide walks you through 3 actionable methods to resolve the issue—no coding expertise required.
What Causes the Memory Exhausted Error? The error occurs when WordPress exceeds its allocated PHP memory limit. Common triggers include: – Large plugin installations/updates – Media-heavy sites (high-resolution images/videos) – Complex themes or custom code – Shared hosting with low default limits
Method 1: Increase Memory Limit in `wp-config.php` This method sets a site-specific memory limit. Ideal for quick fixes without server access.
1. Log into your cPanel → Open File Manager. 2. Navigate to your WordPress root folder (usually `public_html/`). 3. Locate and edit `wp-config.php` (right-click → “Edit”).
4. Add this line before `/* That’s all, stop editing! Happy publishing. */`:
define(‘WP_MEMORY_LIMIT’, ‘256M’);
5. Save changes. Refresh your site to test.
Method 2: Update PHP Memory Limit in cPanel Adjusts the server-wide PHP memory limit for your account. Works if Method 1 fails.
1. In cPanel, go to Software → Select PHP Version.
2. Click the Options tab.
3. Under “Memory Limit,” set a higher value (e.g., `512M`).
4. Click **Save**. Test your site.
Method 3: Use MultiPHP INI Manager (Advanced) Fine-tunes memory limits for specific domains (ideal for multi-site setups).
1. In cPanel, navigate to Software → MultiPHP INI Manager. 2. Select your domain from the dropdown. 3. Scroll to “memory_limit” and update the value (e.g., `512M`).
4. Click Apply. Check your site for resolution.
—
– Test After Each Step: Reload your site to confirm the error is gone. – Contact Hosting Support: If limits remain unchanged, your host may need to adjust server configs. – Optimize Plugins/Themes: Remove unused plugins/themes to reduce memory usage.
By following these steps, you’ll resolve the memory exhausted error and restore full functionality to your WordPress site.
WordPress is the most popular content management system...
Which Is the absolute best web hosting 2025 for WordPre...
Save my name, email, and website in this browser for the next time I comment.