This happens too often when you’re usually activating a plugin or a new template on your WordPress CMS. This just happened to me and I troubleshooting on this so thought of sharing this with my fellows out there. I was trying to activate a membership and shopping cart plugin from the same developers on a test site for a client and came across the white screen on activating both the plugins.

As this was something I experienced for the first time so googled it for a while and diagnosed it to be a memory allocation problem. The memory allocated by default to the WordPress Installation was not adequate to activate those plugin and WordPress Crashed every time I tried activating them.

wordpress memory allocation

BTW, if the online version of WordPress crashes, you have two ways to restore it. One is through the SQL editor that will be hard to do for some people out there. The second alternate way is easier though I am going to describe in another of my posts with the title “Activating/Deactivating Plugin through MySQL and FTP”.

Ok, getting back to the main topic. There are four ways of doing the memory allocation change. Most webhosts provide you a memory of 1GB on a shared web server if you’re on a Premium Plan. Here are the methods anyway:

  1. Irrespective of the type of server you’re on, if you have the access to your PHP.ini file and you can edit it through File Manager of FTP Client, change the line in PHP.ini that says “memory_limit”
    memory_limit = 32M ; Maximum amount of memory a script may consume (32MB)
  2. If you don’t have access to the PHP.ini file, there is still a way out. Let .htaccess do the magic for you. All you’re going to need is to add the following line of code in your .htaccess file:
    php_value memory_limit 32M
  3. The third and most effective method of doing this is through the wp-config.php file that I am sure you’ll have the access to if you’re running a self-hosted website. The following line of code will increase the allocated memory to PHP:
    define (‘WP_MEMORY_LIMIT’ , ’32M”);
  4. The fourth and the last option that we’re left with is to contact your web host provider and ask them to extend the memory on your account to make the script run.

The memory extension, however, is limited according to the memory allocated by your web host to your account. Need more help on the subject, drop me a contact form entry or comment on the post and I will get back to you with sufficient help.