How to Increase the WordPress Memory Limit?

While working on a WordPress website you might get this error "There has been a critical error on this website".

By checking the error log for your Website you can find the reason for the above error. One reason for this error is when the memory limit currently set has been exhausted which can be fixed by increasing the PHP memory limit.

In this article, we will show how to Increase the Memory limit for your WordPress website hosted on SiteCountry Cloud Hosting.

This can be done in 2 methods. We would recommend using Method 1 and if it doesn't work then you may do it through Method 2.

Method: 1

1) Log in to your SiteCountry Control Panel

2) Click on File Manager

3) Navigate to public_html directory of the WordPress website for which you need to increase the memory limit

4) Right-click on the wp-config.php file and Click on Edit

5) Find the line /* That's all, stop editing! Happy publishing. */

6) Right above the line add the below code

define('WP_MEMORY_LIMIT', '256M');

7) Click on the Save File button

Method: 2

1) Log in to your SiteCountry Control Panel

2) Select the Domain Name

Choose the domain name for which you want to increase the memory limit as in the below screenshot

3) Click on Select PHP Version

4) Choose the PHP Version to be used for the Website

5) Then Click on the Options Tab and Change the value for memory_limit

That's It. You have successfully increased the memory limit for the WordPress website.

Still, if you need any help in increasing the PHP memory limit, please feel free to contact our customer support team.