How to Deal with WordPress Memory Problem

As we know, some of us may use blogging software such as WordPress to build our personal websites. However, we may encounter such error notice sometimes: Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate xxx bytes). Today I will share with you how to deal with such problem.

It really sucks when you meet such error information after accessing your domain name. Actually, it was not caused due to HostEase server. That is, you can perform php cms such as WordPress,discuz,drupal and etc… on HostEase server prefectly. But you should make some changes against the default server environment so as to avoid such error caused by the resource limit of the website program itself. Now please follow my advice to solve your problem. I’ll take the newest version of WordPress-3.2.1 for example.

First, please go to the website root directory in cPanel File Manager and find the configuration file named wp-config.php. Add this line of code “define(‘WP_MEMORY_LIMIT’, ’64M’);” to this file. But make sure you add it in a new line.

Second, create a new file called php.ini in your website root directory. It allows you to configure php environment and change the default setting of the server’s php configuration. Write “memory_limit = 64M” in this file and make it be a new line. Sometimes, you may have to change this number bigger and please keep the value same with the number you set in wp-config.php in step one.

Third,build a new file under the root website directory and rename it as info.php. Enter “<? php phpinfo(); ?>” in this file and then use it to check the php setting of server. You can access this file by using “http://yourdomainname/info.php”. Please check whether the value of memory_limit has been changed to 64M. If not, you should also add “suPHP_ConfigPath /home/cpusername/public_html” to .htaccess under your website root directory.

Fourth,and also the last step,type “SetEnv PHPRC /home/cpusername/public_html” in .htaccess file if you can’t deal with the error notice after finishing the first three steps.

Now, guys, we can claps because I think you should solve your problem after doing it according to what I said.Thanks.

1 thought on “How to Deal with WordPress Memory Problem”

Leave a Comment

*