WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] php.ini question (8 posts)

  1. rt2null
    Member
    Posted 7 years ago #

    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)

    Suggestions?

  2. Jeremy Clark
    Moderator
    Posted 7 years ago #

    Add this to your .htaccess file in the root of your wordpress installation.
    php_value memory_limit 16M

  3. rt2null
    Member
    Posted 7 years ago #

    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....

  4. Jeremy Clark
    Moderator
    Posted 7 years ago #

    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.

  5. rt2null
    Member
    Posted 7 years ago #

    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.

  6. whooami
    Member
    Posted 7 years ago #

    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.

  7. rt2null
    Member
    Posted 7 years ago #

    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...

  8. RobertBruce
    Member
    Posted 6 years ago #

    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 mydomin.com/wp-admin/index.php 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, webmaster@iscatterlings.com 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?

Topic Closed

This topic has been closed to new replies.

About this Topic