Answer :
Some WordPress themes and plugins require more memory than the default PHP limit. If your site shows errors like “Allowed memory size exhausted”, you may need to increase your WordPress memory limit. This article explains how to do it safely on GHFS Hosting using Plesk.
1. What Is the WordPress Memory Limit?
WordPress has two memory limits:
-
PHP Memory Limit – Set in the server/PHP settings
-
WP Memory Limit – Set inside WordPress via
wp-config.php
Both must be high enough for your site to run smoothly.
2. Step 1: Increase PHP Memory Limit in Plesk
The server-level memory limit must be equal to or higher than the WordPress limit.
Steps:
-
Log in to your Plesk control panel
-
Go to Websites & Domains
-
Click PHP Settings for your domain
-
Find the option memory_limit
-
Increase it (examples):
-
128M
-
256M
-
512M (only if needed)
-
-
Save changes
This increases the maximum memory PHP can use.
3. Step 2: Increase WordPress Memory Limit in wp-config.php
After increasing PHP memory, update WordPress' own memory setting.
Steps:
-
Open Plesk → File Manager
-
Edit the file
wp-config.php -
Add or update this line:
You can choose a different value (must be within your PHP limit).
-
Save the file
4. Step 3: Check Admin Memory Limit (Optional)
For WordPress admin tasks, you can increase the backend limit:
Use only if you run heavy admin operations like page builders or imports.
5. Recommended Memory Values
-
Small sites: 128M
-
Medium sites: 256M
-
WooCommerce or page builders: 256M – 512M
-
Large or complex sites: 512M+ (consult support first)
Memory should not be set higher than needed.
6. Step 4: Restart PHP (If Required)
Some PHP settings may require a restart.
In Plesk:
-
Go to PHP Settings
-
Click Apply
-
Or use Restart PHP if available
7. How to Verify Memory Limit Is Updated
You can check the new limit using:
Option 1: WordPress Site Health
-
WordPress Dashboard
-
Tools → Site Health → Info → Server
Option 2: phpinfo()
Create a phpinfo.php file with this content:
Upload it, visit /phpinfo.php, check the value for memory_limit.
(Delete the file afterward for security.)
8. When to Contact GHFS Hosting Support
Contact support if:
-
Changes to memory_limit don’t take effect
-
You receive continuous memory errors
-
Your hosting plan restricts memory usage
-
You are unsure how much memory your site needs
GHFS Hosting support can adjust PHP settings or advise the ideal configuration.