How to Increase WordPress Memory Limit on YesDomain Hosting
While managing a WordPress website, you might occasionally encounter an error message like:
“There has been a critical error on this website.”
One of the common causes of this issue is when the PHP memory limit allocated to the site gets exhausted. This means WordPress is trying to use more memory than what’s currently available on the server.
In this guide, we’ll walk you through two easy methods to increase the memory limit for a WordPress site hosted on YesDomain Cloud Hosting. We recommend starting with Method 1. If that doesn’t work for your setup, try Method 2.
✅ Method 1: Update the wp-config.php File
This is the most direct way to boost your WordPress memory usage.
Step-by-step:
- Login to your YesDomain Control Panel.
- From the dashboard, open File Manager.
- Navigate to the directory where your website’s files are located. Usually, this is:
public_html
(or the folder associated with your domain). - Locate the file named wp-config.php.
Right-click on it and choose Edit. - Scroll through the code and find this line:
/* That's all, stop editing! Happy publishing. */
- Just above that line, paste the following code:
define('WP_MEMORY_LIMIT', '256M');
- Click Save to apply the changes.
This line tells WordPress to allocate 256MB of memory — which is usually sufficient for most themes and plugins to work without memory issues.
✅ Method 2: Update Memory Limit via PHP Settings
If editing the wp-config.php
file doesn’t resolve the issue, try increasing memory via PHP configuration.
Steps:
- Login to your YesDomain Control Panel.
- Select the Domain Name for which you want to modify PHP memory limits.
- Click on Select PHP Version (or it may appear as PHP Settings depending on your panel version).
- Choose or confirm the PHP version your site is currently using.
- Open the Options tab, and locate the setting called:
memory_limit
- Set it to
256M
or a higher value if needed. - Changes are automatically saved in most panels, but double-check for a Save or Apply button just in case.
🟢 Final Words
Once these steps are completed, try reloading your website. If the issue was caused by insufficient memory, it should now be resolved.
If you continue facing the error or need expert help, don’t hesitate to reach out to our YesDomain Support Team via ticket or WhatsApp.
Quick Notes:
- For WooCommerce or heavy themes, setting memory to 256M or 512M is ideal.
- Always take a backup before editing core WordPress files.
- For multisite installations, use
WP_MAX_MEMORY_LIMIT
.