• GoDaddy Community
  • VPS & Dedicated Servers
  • VPS & Dedicated Servers

    cancel
    Showing results for 
    Show  only  | Search instead for 
    Did you mean: 
    Go to solution
    Highlighted
    New

    Increase default memory limit PHP

    Adding

    memory_limit 128M;

    to the php5.ini file doesn't do anything. 64MB is not nearly enough when you're working with data-driven applications. I'd like to set it to 128 permanently so I don't have to remember to put the temp solution in each file.

    8 REPLIES 8

    Re: Increase default memory limit PHP

    In your Cpanel try to go to the "Application tile" ->"PHP version" , and you can change the size there too. Hope this helps you.

    Rockstar I Rockstar I
    Rockstar I
    Solution

    Re: Increase default memory limit PHP

    Hi @xlinkx,

     

    Here are the contents of a user.ini file that I use with WP.

    memory_limit = 2048M
    max_execution_time = 1600
    max_input_time = 320
    post_max_size = 120M
    max_input_vars = 2000
    file_uploads = 4
    max_file_uploads = 20
    upload_max_filesize = 200M

     

    Hopes this helps,

    James

    Not Just Pretty Sites, Pretty Doggone Smart Sites
    New

    Re: Increase default memory limit PHP

    hi, i have wordpress hosting for this dns https://nutrivenience.net. this showing Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 262198 bytes) in /home/content/p3pnexwpnas04_data01/91/3161991/html/wp-content/object-cache.php on line 574.

    how can i exceed memory limits. i already added the code in htaccess and wp-config.php files but error is same. what i can do to resolve this?

    Re: Increase default memory limit PHP

    In my version of cPanel:

     

    Software > Select PHP version > Select PHP Version 5.x > Switch to PHP Options

     

    My memory limit was set to 128MB

    Allowed memory size of 67108864 bytes exhausted (tried to allocate 454487 bytes)

    How can i solve this problem  

    New

    Re: Increase default memory limit PHP

    Hi Gabriel,

     

    is the size of the RAM affect the allocation of memory limit? for example: I have 1020MB and the maximum choices of memory limit is 512MB Only. But the problem is i need at least 756MB and  the memory limit cannot be edited manually. Is there another way to increase the choices or should i upgrade my plan to higher RAM for godaddy? it seems like godaddy limits only the maximum memory limit depending on the plan you get.

    Rockstar I Rockstar I
    Rockstar I
    Solution

    Re: Increase default memory limit PHP

    Hi @devx,

     

    Yes, you will need to upgrade to a plan that allows for the 756MB.  I use the Enterprise cPanel hosting which has a 4GB limit that CAN all be used.  The Prime Business allows for 1GB.

    https://www.godaddy.com/hosting/business-hosting

     

    Performance on these servers has been excellent for my sites.  The only problem that I consistently run into is multiple SSL's on the same cPanel.  A bit cumbersome to install the certificates that are not in the root/primary domain and GoDaddy support says that it does not provide support for doing so.  Other than that, these cPanel installations rock!

     

    Hope this helps,

    James

    Not Just Pretty Sites, Pretty Doggone Smart Sites
    New

    Re: Increase default memory limit PHP

    Hi James,

     

    Thank you so much for your help. Another thing, About the plan my current plan is deluxe 2 with 

     Shared resources
    2 CPU cores, 1024 MB RAM, 24/7 Support, Metered storage, 1024 MBps bandwidth.
    If i upgraded to Deluxe 3 which is
     Shared resources
    2 CPU cores, 2048 MB RAM, 24/7 Support, Metered storage, 2048 MBps bandwidth.
     
    will the Deluxe 3 will solve my problem about using atleast 1024 MB of ram for my memory limit.?
    again thanks