Unable to open login page - Allowed memory size exhausted

Discussion in 'WordPress' started by hammadfaisal007, Aug 24, 2012.

  1. #1
    I have a domain (pcabout.com). I was not using it since several months. Today when I checked the traffic and was shocked to see it went to very less. When I googled my site, it's showing my site is attacked with malwares. I am unable to understand, I did not share any login credentials nor used my site since many months, how will my site get affected with malwares.

    And moreover I am not able to see the login page:
    http://www.pcabout.com/wp-admin/
    Code (markup):
    It shows the following error:
    Also my subdomain is not available:
    http://engg.pcabout.com/
    Code (markup):
    It shows the following error:
     
    hammadfaisal007, Aug 24, 2012 IP
  2. ironcladservers

    ironcladservers Well-Known Member

    Messages:
    389
    Likes Received:
    20
    Best Answers:
    4
    Trophy Points:
    115
    #2
    Have you tried increasing the PHP memory limit in php.ini or .htaccess? That should help with the fatal errors you are receiving. Depending how you are setup you may need to contact your hosting provider for that.
     
    ironcladservers, Aug 24, 2012 IP
  3. Ray Baron

    Ray Baron Member

    Messages:
    148
    Likes Received:
    10
    Best Answers:
    3
    Trophy Points:
    43
    #3
    This is a common problem with WordPress which can be memory intensive. It probably has nothing to do with being "attacked."

    The fix is simple. You need to increase the amount of memory given to PHP.

    First, find out how much memory PHP is given. You can find it with phpinfo or ask your hosting provider.

    Next, add the following line to your .htaccess file, changing the number based on the figure you get in the previous step.

    php_value memory_limit 64M[COLOR=#111111]
    [/COLOR]
    Code (markup):


    64M is normally fine for WordPress. But if your PHP is already configured for 64M you will need to increase it. Increase in 32M increments, so if it is set to 64M, make it 96M.

     
    Ray Baron, Aug 25, 2012 IP
  4. hammadfaisal007

    hammadfaisal007 Member

    Messages:
    140
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    28
    #4
    Where to add in .htaccess file? I added just before "</IfModule>" and reloaded my site and got this error:

     
    Last edited: Aug 25, 2012
    hammadfaisal007, Aug 25, 2012 IP
  5. Ray Baron

    Ray Baron Member

    Messages:
    148
    Likes Received:
    10
    Best Answers:
    3
    Trophy Points:
    43
    #5
    You need to put it on a line by itself, outside any containers such as the <IfModule> container.

    To be sure it is correct, just put it at the very top of the htaccess before everything else in the file.

    If you still have a problem with it, post your entire htaccess file here.
     
    Ray Baron, Aug 25, 2012 IP
  6. hammadfaisal007

    hammadfaisal007 Member

    Messages:
    140
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    28
    #6
    I contacted the host provider, they can only provide max 32mb of PHP memory and but my plugins need more memory. What can I do now?
     
    hammadfaisal007, Aug 27, 2012 IP
  7. Ray Baron

    Ray Baron Member

    Messages:
    148
    Likes Received:
    10
    Best Answers:
    3
    Trophy Points:
    43
    #7
    You will need to move to another host. There are no 'tricks' to make WordPress work (or anything else) when more memory is needed by the application.

    WordPress recommends 64M and some plugins require even more memory. If you are limited to 32M you will be limited to a very basic WordPress site.
     
    Ray Baron, Aug 27, 2012 IP