Support » Fixing WordPress » php.ini question

  • Resolved rt2null


    I am on a shared server and need to adjust my php memory limit for a few WP Plugins. Adding a php.ini in the includes directory or in the specific plugin directory itself does not change the memory limit.

    It’s a specific to php and memory because the script is reporting back: (Error : Exceed Memory limit)


Viewing 7 replies - 1 through 7 (of 7 total)
  • Add this to your .htaccess file in the root of your wordpress installation.
    php_value memory_limit 16M

    I have tried that a few times – .htaccess in the root of wordpress generates a 500 Internal Server Error. I just copied and pasted you entry above.

    Error Log:
    .htaccess: Invalid command ‘php_value’, perhaps mis-spelled or defined by a module not included in the server configuration

    Should this work? I have noticed a bunch of entried suggesting this fix….

    It depends on how your server is set up. You really need to find the actual php.ini file and change the value there. If your on your own linux box just type whereis php.ini in the terminal otherwise you’ll have to get your host to increase it.

    Thanks for the response. This is a hosted site, but my provider suggests me to adjust it in the php.ini file vs them doing it.

    Where should they go for WP? I have already added it to the WP root, wp-includes and the specific script directory. It doesn’t appear to be working.




    It doesn’t appear to be working.

    What are you basing that on? The error? That doesnt mean the memory increase isn’t taking effect.

    Do this,

    1. You have a php.ini in your root directory — leave that one alone, and delete the others, you need ONLY one.

    2. Create another file, put this in it:

    <?php phpinfo(); ?>

    upload that to your website, name it whatever you want, just make sure that the file extension ends with .php

    Come back here after youve uploaded that file, and post a link to it, so that we can look at it.

    Thanks – I found it. Because this was php4 and needed to add php.ini into the wp-admin dir as the script was calling for a file in it.

    Thanks everyone…



    I have tried all ther above plus different versions like .htaccess containing increase to memory while creating a brand new php.ini file with your one-liner code in it and placing it in WP-admin and then to public_html etc etc etc

    Nothing corrects the error. I also renamed the plugins directory to see if this was the root cause of the memory overload, but nothing was corrected.

    So I am still denied access to my site. Even trying does not work. I really am locked out.

    Here is the error message:
    The server encountered an internal error or misconfiguration and was unable to complete your request.
    Please contact the server administrator, and inform them of the time the error occurred, and anything you might have done that may have caused the error.

    More information about this error may be available in the server error log.

    Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.

    Can you help?

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘php.ini question’ is closed to new replies.