A WordPress memory-exhaustion error means a PHP operation reached its allowed memory limit. You can review the site’s PHP limit and WordPress’s requested limit, then increase them within the hosting account’s available resources if the operation needs it.
Check the current limit
Record the complete error and the operation that caused it. In WordPress, review Tools > Site Health > Info and compare the reported PHP settings with the domain’s hosting-panel configuration.
The limit applies to an individual PHP script, not a combined allowance calculated by adding together every website. Increasing it does not add RAM to the hosting account.
Change PHP’s limit
Use the website’s PHP settings in cPanel, Plesk or the server’s supported configuration. For example:
memory_limit = 256MChoose a value suitable for the application and hosting allocation. Do not assume /etc/php.ini controls every cPanel PHP version or that php_value in .htaccess works with the active handler.
Change WordPress’s requested limit
Back up wp-config.php. Before the stop-editing line, add or edit the existing constant, avoiding duplicates:
define('WP_MEMORY_LIMIT', '256M');This asks WordPress to use that limit where PHP permits it. It cannot override an administrator-enforced ceiling. Some administrative operations use the separate WP_MAX_MEMORY_LIMIT setting; review the actual operation before changing it.
Test and investigate
Repeat the failed operation and check the effective limit and logs. If usage keeps growing, investigate the plugin, query or workload instead of setting an unlimited allowance. Restore the previous settings if the increase causes resource pressure or is unnecessary.