• 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:
    https://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!

Viewing 8 replies - 1 through 8 (of 8 total)
  • Thread Starter thehappyeater

    (@thehappyeater)

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

    Thread Starter thehappyeater

    (@thehappyeater)

    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!

    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.

    Thread Starter thehappyeater

    (@thehappyeater)

    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!

    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: https://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!

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

    Thread Starter thehappyeater

    (@thehappyeater)

    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?

    Thread Starter thehappyeater

    (@thehappyeater)

    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!

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

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘increasing memory size for a beginner’ is closed to new replies.