WordPress.org

Ready to get started?Download WordPress

Forums

Change maximum upload size and find php.ini (31 posts)

  1. shamil55
    Member
    Posted 2 years ago #

    Hi everyone,

    For 2 days I have been trying to change maximum upload size because I was not able to upload big new plugins and also pictures to NextGEN Gallery with over 2MB sizes. I had my limit up to 2MB, but now I changed to 1000MB.

    So how I did it?

    First of all, we should know where our php.ini is located. I was building my wordpress web-site on my localhost for testing, so basically I was not changing anything through hosting web-sites. In case if your wordpress is hosted by any company, please refer to other topics.

    So I will start briefly, but in case if you have questions, I am ready to answer.

    1. Create new text file in our wp-admin directory root and name it info.php.
    2. Open info.php and add these lines:
    <?php

    phpinfo();

    ?>

    3. Save it.
    4. Go to yourwebsitename(probably localhost)/wp-admin/info.php in any web-browser.
    5. In the 8th line you will see: Configuration File (php.ini) Path, in my case it is C:\Windows, meaning it is located on my C drive.
    6. In the 9th line you will see: Loaded Configuration File, and next to it is written C:\Program Files (x86)\IIS Express\PHP\v5.3\php.ini

    So I found my php.ini page that is associated with my wordpress web-site.

    7. Go to that path, and find php.ini.
    8. Open it, and edit:
    Search for post_max_size=8M, and change it to post_max_size=1000M
    Search for upload_max_filesize=2M, and change it to upload_max_filesize=1000M

    9. Go back to your admin page>Media>Add New
    10. On the bottom you will see that 2MB has changed to 1000M.

    P.S: I had problems with overwriting php.ini page, it was telling me access is denied. If you have such problems, google it, and change some permissions so you can edit that file.

    Good luck!

  2. bittersweeter
    Member
    Posted 2 years ago #

    Thanks a million for your post. I've been searching for days without creating a new php.ini file within wp-admin directories. By the way, after your instruction, my Apache needed a restart in order for the changes to take effects. Thanks for sharing.

  3. shamil55
    Member
    Posted 2 years ago #

    Thanks a million for your post. I've been searching for days without creating a new php.ini file within wp-admin directories. By the way, after your instruction, my Apache needed a restart in order for the changes to take effects. Thanks for sharing.

    You are welcome! I am happy that my post helped someone :)

  4. eamon1193
    Member
    Posted 2 years ago #

    thanks for this topic.. now my max size upload is 1000mb

    ...ty much

  5. squarepeg
    Member
    Posted 2 years ago #

    Hi - I need to change these settings, but can't find my php.ini. can anyone point me in the right direction? took a screenshot of the settings I need to change, but can't find a way to upload it here. thanks :)

  6. shamil55
    Member
    Posted 2 years ago #

    Hi - I need to change these settings, but can't find my php.ini. can anyone point me in the right direction? took a screenshot of the settings I need to change, but can't find a way to upload it here. thanks :)

    Check the post above, I wrote how to find it. Could you find it now?

  7. squarepeg
    Member
    Posted 2 years ago #

    I read that, but it doesn't work, that's why I posted my request :)

    I get stuck on the first step! when I type in yourwebsitename/wp-admin/info.php (replacing with my website name, obviously!) it comes up with

    Error 404 - Not Found

    Sorry, but you are looking for something that isn't here.

    from within my website page.
    thanks for any help you can offer :)

  8. shamil55
    Member
    Posted 2 years ago #

    I read that, but it doesn't work, that's why I posted my request :)

    I get stuck on the first step! when I type in yourwebsitename/wp-admin/info.php (replacing with my website name, obviously!) it comes up with

    Error 404 - Not Found

    Sorry, but you are looking for something that isn't here.

    from within my website page.
    thanks for any help you can offer :)

    Aaaa ok, I know why, just a second, let me write you why :D

  9. squarepeg
    Member
    Posted 2 years ago #

    thanks :)

  10. shamil55
    Member
    Posted 2 years ago #

    I read that, but it doesn't work, that's why I posted my request :)

    I get stuck on the first step! when I type in yourwebsitename/wp-admin/info.php (replacing with my website name, obviously!) it comes up with

    Error 404 - Not Found

    Sorry, but you are looking for something that isn't here.

    from within my website page.
    thanks for any help you can offer :)

    So create a new text file in your wp-admin folder with the name info.php and edit the file with these:

    <?php

    phpinfo();

    ?>

    Save the file, and now check again yourwebsitename/wp-admin/info.php

    Good luck ;)

  11. squarepeg
    Member
    Posted 2 years ago #

    thank you. i'm VERY new to this. when you say create a new text file in the wp-admin folder.....*blushes*

  12. shamil55
    Member
    Posted 2 years ago #

    thank you. i'm VERY new to this. when you say create a new text file in the wp-admin folder.....*blushes*

    It is fine, I have learned like you as well ;) reading forums everyday :D And still learning :D

    Just let me know if you could figure it out...

  13. squarepeg
    Member
    Posted 2 years ago #

    sorry....don't know where to create file...

  14. shamil55
    Member
    Posted 2 years ago #

    sorry....don't know where to create file...

    OK, go to your folder where you have installed your wordpress. It is in your computer, or in your FTP folder, or type in your search box in start "wp-admin" and you will see a folder. Go to the folder, right click on your mouse, create a text file. Then rename it to info.php, and go to text file, type what I have posted above:

    <?php

    phpinfo();

    ?>

    then save it, and then go to your websitename/wp-admin/info.php

    Let me know if you could figure it out or not yet...

  15. squarepeg
    Member
    Posted 2 years ago #

    ahhh....right..I don't have wordpress installed on my computer :) :) :) I upload pages to the website and edit it, but it was already set up when I took it over.

  16. squarepeg
    Member
    Posted 2 years ago #

    didn't even realise you COULD download it onto the computer itself...feel so silly now!

  17. shamil55
    Member
    Posted 2 years ago #

    ahhh....right..I don't have wordpress installed on my computer :) :) :) I upload pages to the website and edit it, but it was already set up when I took it over.

    OK, go to your hosting web-site, and find the folders there, it is very easy, or use File-Zila to edit your folders via FTP.

  18. shamil55
    Member
    Posted 2 years ago #

    didn't even realise you COULD download it onto the computer itself...feel so silly now!

    Yes you can if you want to run it from your own-site or at the beginning with the localhost to build the web-site and then move all your folders to the hosting web-site...

    Check on the google, wordpress with Microsoft Web-Matrix, very easy to install WordPress on your localhost computer.

  19. squarepeg
    Member
    Posted 2 years ago #

    I use /wp-admin to log in, so is everything not a subdirectory of that?

  20. shamil55
    Member
    Posted 2 years ago #

    I use /wp-admin to log in, so is everything not a subdirectory of that?

    Functioning things are the subdirectory of the wp-admin, even try yourwebsite/wp-admin/index.php and you will see the same page with yourwebsite.com ;)

    But plugins, themes and some other additional things are the subdirectories of wp-content and wp-includes.

  21. squarepeg
    Member
    Posted 2 years ago #

    oh dear.....:( I have done the text file no problem, but I can't find where to place it. I can find the css style sheet and the theme editor and custom.php and a whole list of other things, but nowhere that I think you're trying to point me to. I'm sorry I'm not being very helpful!

  22. shamil55
    Member
    Posted 2 years ago #

    oh dear.....:( I have done the text file no problem, but I can't find where to place it. I can find the css style sheet and the theme editor and custom.php and a whole list of other things, but nowhere that I think you're trying to point me to. I'm sorry I'm not being very helpful!

    It is fine, make the screenshot, and send it to my e-mail address mustafayev.shamil@gmail.com

    I am going to sleep in 10 min, try to be quick :D

  23. trying to keep uo
    Member
    Posted 1 year ago #

    I am trying to cipher your instructions, yet you went P.M on me after Squarepeg asked for specific path directions.

    I was hoping to do this on my server, instead of doing it local and FTPing it...
    Can this be done via creating a folder on my networksolution server under File Manager? Create a Folder (IF SO what name? Phpinfo or Php.ini?)

    Then can't I create a file inside that (?? named folder) and then write that code into that file?
    If this is possible, it would be appreciated if you could walk me through the steps,names and code needed to expand or modify my php.ini to a bigger size capabilities. I beleive NWS has a 64 limit, however if I can get away with more, and not draw attention to myself, I will take it and use it wisely.
    This is my error:
    Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 30720 bytes) in /data/22/2/153/159/2153648/user/2363821/htdocs/netcommercialnet/wp-admin/includes/menu.php on line 38

  24. trying to keep uo
    Member
    Posted 1 year ago #

    Got it...

    Created a Notepad text file on my dsktop (locally) and named it php.ini all lower case.
    Put two lines of code in that php.ini text file:
    memory_limit = 64M
    output_buffering = 2048

    Uploaded into my (cgi-bin folder). No deeper then that!

    This folder is located in htdocs folder, right next to a folder in there named .php folder.
    After uploading- I clicked into that .php folder is where you will find another text file named php.coalesced Delete that one.

    Double check it was removed by back clicking out of that folder and re burrowing in and making sure that php.coalesced file was deleted.
    Good to go after that.

    This may be redundant but it worked for me
    This worked for my Network solutions account

    The path was IE:165161netsolhost.com/htdocs/cgi-bin is where the php.ini file goes and the file that needed to be deleted was 165161netsolhost.com/htdocs/cgi-bin/.php/ DELETE (php.Coalesced)

    Hope this helps. It seems this is Par for the course out there, you would think WP would create a folder to override that, but them again it would conflict with other Servers too?

  25. Emyrrich
    Member
    Posted 1 year ago #

    Thank you, Thank you, Thank you !!!!

    I've been trying to sort this out for the last three days. I've edited just about every php.ini file on my system except for the correct one which I found via your very useful info.php script.

    Thanks again.

  26. shamil55
    Member
    Posted 1 year ago #

    Thank you, Thank you, Thank you !!!!

    I've been trying to sort this out for the last three days. I've edited just about every php.ini file on my system except for the correct one which I found via your very useful info.php script.

    Thanks again.

    You are welcome :)

  27. silentfxx
    Member
    Posted 1 year ago #

    trying to keep uo: The path was IE:165161netsolhost.com/htdocs/cgi-bin is where the php.ini file goes and the file that needed to be deleted was 165161netsolhost.com/htdocs/cgi-bin/.php/ DELETE (php.Coalesced)

    I'm having trouble seeing / deleting the (php.Coalesced) I also have Network Solutions and I don't see that file while in their File Manager.

    I only see these files
    error_log
    fileman.cgi
    global.dat
    php.dat

    http://s7.postimage.org/529cf6jih/photo.png

    Can anyone help?
    I'm trying to enable mod_expires does anyone know how to do that?

  28. UaMV
    Member
    Posted 1 year ago #

    @bittersweeter: Thanks, your note on restarting the server is just what i needed to get this working.

  29. Corky1369
    Member
    Posted 1 year ago #

    Hello, I am tying to do the same thing with Network Solutions and am having problems. First there is no php.Coalesced to delete and there is no other php.ini file anywhere else to edit.

    So I created a php.ini file in the cgi-bin with:
    memory_limit = 64M
    output_buffering = 2048

    but that isn't working. Silentxx did you figure yours out?

  30. Corky1369
    Member
    Posted 1 year ago #

    More information: Now I get this message when I try to access my file manager:

    500: Internal server error

    This error is generated when a script running on the server could not be implemented or permissions are incorrectly assigned for files or directories

    Troubleshooting suggestions:

    Temporarily disable any rewrite rules by renaming your .htaccess file if it exists.

    Ensure that any CGI or Perl scripts have at least .755. permissions.

    If trying to run PHP and you get this error, you may have an invalid php.ini in your /cgi-bin, or may be missing your php.dat file in this folder.

    I have no idea what to do!

Topic Closed

This topic has been closed to new replies.

About this Topic