+ Reply to Thread
Results 1 to 8 of 8

Thread: Change upload size limit in php.ini?

  1. #1
    LoTekJunky is offline New Bee
    Join Date
    Feb 2009
    Posts
    4
    WHB Points this Month
    0.00
    WHB Points
    0.00
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Change upload size limit in php.ini?

    I just switched to your service from a more expensive provider and everything has been great. I love the options WHB provides.

    I do have an issue that I hope can be resolved. I frequently post pictures to my Wordpress installation but the php.ini file for my server is limiting uploads to 2mb. Not many cameras take pictures that small so i have to scale the pictures down before posting them. Can you please change this limit to something more modern like 10mb? My domain is darkcloud.org

    Thanks,
    Nick

  2. #2
    Maxim M.'s Avatar
    Maxim M. is online now WeeHBie
    Join Date
    Sep 2008
    Location
    Kharkiv, UA
    Posts
    536
    Servers
    webhostingbuzz.com
    WHB Points this Month
    0.00
    WHB Points
    45.00
    Thanks
    14
    Thanked 3 Times in 3 Posts

    Default

    Hi Nick,

    You may always create a custom php.ini for your account. In particular, you should add one to WordPress folder with the following entry in it:
    upload_max_filesize = 10M

  3. #3
    squinky86 is offline Senior Member
    Join Date
    Jan 2008
    Posts
    100
    WHB Points this Month
    0.00
    WHB Points
    0.00
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I also had to modify the post_max_size variable .

  4. #4
    LoTekJunky is offline New Bee
    Join Date
    Feb 2009
    Posts
    4
    WHB Points this Month
    0.00
    WHB Points
    0.00
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thank you for the quick responses, it's much appreciated. I'm still having the same issue. Let me explain my setup and ask some questions and see if I can get this sorted

    -My wordpress installation is in /www/wordpress
    I-'ve created a file -> /www/wordpress/php.ini that looks like this:

    <code>
    upload_max_filesize = 20M
    post_max_size = 100M
    </code>

    Did I put the file in the correct directory? Does the file need to contain any other information or just the items I'm wanting to customize? Do I have to restart php somehow for my custom php.ini file to go into effect?

    I have very little experience with php. I'm trying to learn by working on wordpress. I've used phpmyadmin before but I have never had to deal with actually making the changes to the ini file. I really appreciate everyone's help with this.

    Thanks!

  5. #5
    Maxim M.'s Avatar
    Maxim M. is online now WeeHBie
    Join Date
    Sep 2008
    Location
    Kharkiv, UA
    Posts
    536
    Servers
    webhostingbuzz.com
    WHB Points this Month
    0.00
    WHB Points
    45.00
    Thanks
    14
    Thanked 3 Times in 3 Posts

    Default

    Quote Originally Posted by LoTekJunky View Post
    -My wordpress installation is in /www/wordpress
    I-'ve created a file -> /www/wordpress/php.ini that looks like this:

    <code>
    upload_max_filesize = 20M
    post_max_size = 100M
    </code>

    Did I put the file in the correct directory? Does the file need to contain any other information or just the items I'm wanting to customize? Do I have to restart php somehow for my custom php.ini file to go into effect?
    php.ini is supposed to be in all folders with php scripts. In your case, the correct path is:
    /public_html/wordpress/php.ini (/www/wordpress/php.ini)
    The file should look like:

    [PHP] {header, obligatory}
    upload_max_filesize = 20M
    post_max_size = 100M

    No more entries are required. New settings are enabled once the file is created without the restart.
    You may also ask for our default server php.ini in a technical ticket at whbsupport.com to see some other options available.

  6. #6
    LoTekJunky is offline New Bee
    Join Date
    Feb 2009
    Posts
    4
    WHB Points this Month
    0.00
    WHB Points
    0.00
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thank you, I was obviously forgetting the header. I've updated the php.ini file in the correct directory. Does the file have to be in a certain encoding format or will a file created with notepad.exe in windows work properly? I'm still having issues and it keeps saying that my upload limit is 2MB. I will give it some time and see if it works later.

  7. #7
    Taras O. Guest

    Default

    Yes, it should be ok if you create it in the notepad, but you also can copy/paste the text to cPanel editor and then just save the file.

    Please note, that you should put the php.ini file to all the directories containing scripts which depend on those settings.

  8. #8
    LoTekJunky is offline New Bee
    Join Date
    Feb 2009
    Posts
    4
    WHB Points this Month
    0.00
    WHB Points
    0.00
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thanks for everyone's help.

    After putting the custom php.ini file in all of the required directories, it now works as it should!

    Thanks!

+ Reply to Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts