When do I need to increase PHP memory?
If you see errors like Fatal error: Allowed memory size exhausted or your WordPress shows a white screen, it's likely you need more PHP memory. This often occurs with complex sites, heavy plugins, or WooCommerce stores with many products.
Method 1 — From the PHP Selector in cPanel (recommended)
- Log in to cPanel
- Look for the "Software" section
- Click on "Select PHP Version"
- Click on the "PHP Options" tab
- Find
memory_limitand change the value. We recommend 256M or 512M - Click on "Save"
Method 2 — From the .htaccess file
Add this line to your .htaccess file inside public_html:
php_value memory_limit 256M
Method 3 — From wp-config.php (WordPress)
Open the wp-config.php file and add before the line /* That's all, stop editing! */:
define('WP_MEMORY_LIMIT', '256M');
✅ Recommended values:
Simple blog: 128M
WordPress with plugins: 256M
WooCommerce / store: 512M
Simple blog: 128M
WordPress with plugins: 256M
WooCommerce / store: 512M