WordPress.org

Ready to get started?Download WordPress

Forums

increasing memory size for a beginner (9 posts)

  1. thehappyeater
    Member
    Posted 1 year ago #

    Hi,
    I am trying to increase the memory size so I can upload photos without getting fatal error messages.
    I use netregistry.
    They sent me the following instructions:
    http://www.netregistry.com.au/support/articles/cpanel-using-php-ini-to-control-your-php-configuration

    I can get into file manager, public_html then I don't know what to do to either create a php.ini file, or edit the php file.
    I can open wp_settings.php but it does not have a code line that has the memory size.
    If I create a php.ini file do I literally just create a brand new blank file, and write "memory_limit = 80M" in line 1 and that's it? Or am I meant to do something more than that?

    I am a complete beginner, so please be as non-techinical as you can be in your explanaion, and completely step by step, it took me hours to even find the file manager!

    Thank you for helping!

  2. thehappyeater
    Member
    Posted 1 year ago #

    further to the above, I tried creating a new file that is called php.ini and the full code was "memory_limit = 80M;" and then tried to upload my image, and it still gave me the fatal error message.

    Please help me!
    Thanks :)

  3. thehappyeater
    Member
    Posted 1 year ago #

    Hi and one more update, I also made the php.ini global by doing this:

    Modify or create the file called .htaccess inside your public_html/ folder
    Add the following code to the start of the .htaccess file:
    suPHP_ConfigPath /home/USERNAME/public_html/

    and still get the error message.

    Thanks!

  4. esmi
    Theme Diva & Forum Moderator
    Posted 1 year ago #

    If I create a php.ini file do I literally just create a brand new blank file, and write "memory_limit = 80M" in line 1 and that's it?

    Yes. Just ensure that you use a plain text editor to create the file and that you upload it in ASCII mode.

  5. thehappyeater
    Member
    Posted 1 year ago #

    Hi esmi,
    sorry, I'm too beginner to understand that.
    I did new file, titled it "php.ini" then in the box that came up to edit it I wrote "memory_limit = 80M;"

    That doesn't seem to have worked though.
    What is ASCII mode? I may need to do something for that. Thanks!

  6. mojowill
    Member
    Posted 1 year ago #

    Firstly if you are a complete beginner then you should be NO WHERE near your php.ini. Leave your server configuration to someone who really knows what they are doing.

    Secondly you shouldn't have to make changes to your php.ini you should be able to jsut place overrides in your .htaccess depending on your server settings.

    See about .htaccess overrides: http://roshanbh.com.np/2008/01/uploading-larger-files-in-php.html

    Thirdly after making changes to your php.ini you will need to restart apache for changes to take effect.

    More help can be found here: DO NOT FOLLOW METHOD 1, you should never override server settings in a theme!

    http://www.wpbeginner.com/wp-tutorials/how-to-increase-the-maximum-file-upload-size-in-wordpress/

  7. thehappyeater
    Member
    Posted 1 year ago #

    oh, I just looked at the encoding drop down menu, I uploaded in utf-8 which was the default.
    Do I need to change that to us-ASCII?

  8. thehappyeater
    Member
    Posted 1 year ago #

    Thank mojowill.
    I have deleted the php.ini file I created, and changed the code in the .htaccess file from what I put in originally "suPHP_ConfigPath /home/USERNAME/public_html/" to the steps you gave me.

    How do I restart apache?

    umm, and now I seem to have created an internal server error in my site, so I can't get into wp-admin
    can anyone help with that?

    thansk!

  9. @mojowill said:

    Thirdly after making changes to your php.ini you will need to restart apache for changes to take effect.

    Wrong. And@mojowill said:

    Secondly you shouldn't have to make changes to your php.ini you should be able to just place overrides in your .htaccess depending on your server settings.

    "depending on server settings" that thehappyeater doesn't have access to.

    @thehappyeater: The easiest thing to try is not edit php.ini or .htaccess and add a line to wp-config.php. Right now, use FTP or the control panel file editor to reverse the changes you made to php.ini. and .htaccess. The 500 server error is from using the wrong character encoding in .htaccess.

    After you're back up, try adding the 'define" line below to your wp-config.php file a few lines of white space below the opening <?php

    define('WP_MEMORY_LIMIT', '64M');

    If none of those work, your host probably doesn't allow memory allocation overrides. You're stuck with what they give.

Topic Closed

This topic has been closed to new replies.

About this Topic