Sometimes when installing or using themes and plugins in WordPress, you might run into errors related to the memory limit assigned to PHP. Some common messages include:
These errors mean that WordPress has reached the allowed memory limit and needs more resources to function properly. Fortunately, you can fix this by editing a key file: wp-config.php.
In WordPress, there are two important memory settings you can define:
This allows the admin panel to run heavier tasks, such as installing themes or updating plugins, without affecting performance for regular site visitors.
Follow these steps to make the change:
Go to your cPanel at https://cpanel.yourdomain.com and log in with your username and password.
From the cPanel dashboard, go to File Manager and navigate to the folder where WordPress is installed (usually the public_html folder).
define('WP_MEMORY_LIMIT', '128M');
define('WP_MAX_MEMORY_LIMIT', '256M');Note: You can adjust the values based on your site's needs. For example, 256M or even 512M if you're running heavy tasks and your hosting plan allows it.
Changes take effect immediately. You can reload your site or retry the action that triggered the error. If the issue persists, your hosting account might have a server-level limit. In that case, feel free to contact us so we can investigate and help you resolve it.