Need help with php.ini File. To increase PHP Memory

Hi I am having trouble with editing my php.ini file so I can increase the php memory and I have views the file and its totally empty. I have been directed to increase he php memory here by dong a Google search and it shows you with a video how to do it but there file has content and mine is totally blank and 0 Bytes. Where can I get a copy of this file from? I have home directory backups of this site and the file - php.ini is not in ANY of my backups I don't understand why.

  • Madhusudan

    Hello Cloude,
    Thanks for the question.

    Where can I get a copy of this file from?

    The php.ini file is located inside wp-admin folder. If you don’t see it, it might have been hidden, so make sure you select show hidden files options. You can create a new text file and name the file as php.ini and edit it in case php.ini doesn't exist.

    There are numerous solutions for increasing php memory. You can check out this tutorial : https://premium.wpmudev.org/blog/increase-memory-limit/

    Hope that helps! Enjoy your weekend :slight_smile:
    Thanking you,
    Madhusudan

  • Claude

    I joined this service because my damn hosting won't ever help me and I told you that several times and now your trying to send me back to them every time I ask them they say Wordpress is beyond their support and ALL my sites are wordpress which I am really getting sick of endless friggen trouble with it.

    In my last ticket above I told you that my php.ini file is in my Public html folder and its totally empty and you have just told me it should be in my wp-admin folder so I have looked in there and theres NO php.ini file in there. You also said make sure all hidden files are showing but didn't tell me how to check or do that in Cpanel.

  • Alex Stine

    Hello,
    I am sorry you did not find our answers to helpful. Let me try to help you out some more.

    A side note, I only recommended your host cause like I said, they knnow their setup we do not. There is quite a few ways to increase the php memory limit, some work at certain hosts and some do not.

    Now going forward, what host are you at? Did you read the article that Madhusudan linked in his last reply? I would have linked you the same article.

    As far as I know, there is no php.ini file included with WordPress. What I would do is this.
    1. Login to Cpanel.
    2. Click File Manager.
    3. New File.
    4. Name it php.ini.
    5. Put these lines in it.

    upload_max_filesize = 1000M
    post_max_size = 2000M
    memory_limit = 3000M
    file_uploads = On
    max_execution_time = 180

    I am not staff here, I just like giving back to the people who care so much about WordPress. I also don't appreciate "you all". How were we supposed to know you had Cpanel, did you ever say that until now? Remember, you get out of a ticket what you put in.

    Thanks,
    Alex :smiley:

  • Claude

    Sorry if I sound angry I don't mean it its just been happening for 6 months and I am so tired and frustrated of it all cause I can't get any help and I did take this out as a support ticket so I thought I was talking to developers or staff. I have done what was mentioned above which is the article they sent to me which is what this whole ticket was about in the first place but my php.ini file was empty. Anyhow I created a new file and save it and then in my cpannel I get this page when trying to open the file asking for some Token which I have tried my WP login and my Cpanel login and they don't work so I can't even open this file I just created so I open via FTP and The file is totally empty the one I just created so how am I supposed to edit an empty file its And as I have mentioned my host won't help me they are unbelievably ignorant and I have told them about these weird locked pages all over my cpanel that won't let me view or edit some files like wp.config and others like that. So maybe you can see my frustration now and its the sole reason I Upgraded my WP MU Dev account.

  • Madhusudan

    Hello Claude,
    Okay, I'd say that we'll want to have a look at your php.ini file, could you send in the following via our secure contact form:

    - Mark to my attention, the subject line should contain only: ATTN: Madhusudan Pokharel
    - Do not include anything else in the subject line, doing so may delay our response due to how email filtering works.
    - Link back to this thread
    - Include WordPress admin access details (login address, username & password)
    - Include FTP log-in details (hostname, username & password)
    - Include any relevant URLs for your site

    IMPORTANT: Please make sure you select "I have a different question" for your topic, so it doesn't go back to the forums - this and the subject line ensure that it gets assigned to me.

    https://premium.wpmudev.org/contact/

    Thanking you,
    Madhusudan

  • Madhusudan

    Hello Claude,
    The other way is by editing your .htaccess file. I have added the following code at the very bottom of .htaccess file:

    php_value upload_max_filesize 1000M
    php_value post_max_size 2000M
    php_value memory_limit 3000M
    php_value max_execution_time 180
    php_value max_input_time 180

    You can change the values to limits that best suit your needs.Also don’t forget to save when you’re done and you also need to clear the cache for your browser.

    Let us know how it goes.

    Thanking you,
    Madhusudan Pokharel

  • Claude

    My site has now totally disappeared and displays a error page pasted below and I get the same page if I try to login to my admin I can login to cpannel but don't know what to do to fix this. After you edited the .htaccess file did you try to browse to the site or to the admin login? Anyhow page error is below.....

    Internal Server Error
    The server encountered an internal error or misconfiguration and was unable to complete your request.

    Please contact the server administrator at webmaster@thebluesguitarist.net to inform them of the time this error occurred, and the actions you performed just before this 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.

  • Claude

    Here is text from server error log for today...

    [28-Mar-2016 03:00:10 UTC] PHP Fatal error: Out of memory (allocated 60555264) (tried to allocate 1920 bytes) in /home/ccstopad/public_html/wp-content/plugins/wptouch/core/menu.php on line 203
    [28-Mar-2016 03:00:10 UTC] PHP Fatal error: Out of memory (allocated 60817408) (tried to allocate 12288 bytes) in /home/ccstopad/public_html/wp-content/plugins/wptouch/themes/foundation/root-functions.php on line 166
    [28-Mar-2016 03:00:10 UTC] PHP Fatal error: Out of memory (allocated 61079552) (tried to allocate 12288 bytes) in /home/ccstopad/public_html/wp-content/plugins/wptouch/themes/bauhaus/root-functions.php on line 150
    [28-Mar-2016 03:00:10 UTC] PHP Fatal error: Out of memory (allocated 60555264) (tried to allocate 3072 bytes) in /home/ccstopad/public_html/wp-content/plugins/wptouch/core/menu.php on line 175
    [28-Mar-2016 03:00:10 UTC] PHP Fatal error: Out of memory (allocated 74448896) (tried to allocate 12288 bytes) in /home/ccstopad/public_html/wp-content/plugins/membership/app/model/class-ms-model-relationship.php on line 1742
    [28-Mar-2016 03:00:10 UTC] PHP Fatal error: Out of memory (allocated 74711040) (tried to allocate 12288 bytes) in /home/ccstopad/public_html/wp-content/plugins/membership/app/model/class-ms-model-event.php on line 190

  • Claude

    OK thanks for your help I have viewed the .htaccess file and it has got the section you said you added which I have pasted below. Just wondering if the code you entered should it be below the VALUE that says # END WordPress like it is now or should it be above it? Also the Values you have set are they stable values like and won't give me memory errors or can I comfortably make them a bit higher values?

    # END WordPress

    php_value upload_max_filesize 1000M
    php_value post_max_size 2000M
    php_value memory_limit 3000M
    php_value max_execution_time 180
    php_value max_input_time 180

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.