Forums

[resolved] how to change media file upload limit for localhost (5 posts)

  1. redned
    Member
    Posted 1 year ago #

    When I work on a live site, my media file upload limit is 8MB. When I work on localhost the limit is 2MB. I assume that 2MB is the WP default and that my host does something to up this to 8MB for the live site. After reading other topics I tried editing the relevant php.ini parameter, but it had no effect. I have very little coding experience. Is there a trick to this?

  2. ClaytonJames
    Member
    Posted 1 year ago #

    Just to make sure we're on the same page, on your localhost install, open php.ini and find these lines;

    ; Maximum allowed size for uploaded files.
    upload_max_filesize = 2M

    ; Maximum size of POST data that PHP will accept.
    post_max_size = 8M

    The change won't take effect until you restart apache. Then the message in your dash board will reflect the new upload limitations.

    For example:

    if you change upload_max_filesize = 2M - to - upload_max_filesize = 8M

    The dashboard message should then say; "Maximum upload file size: 8MB", but you will need to restart the web server for changes in php.ini to take effect.

  3. redned
    Member
    Posted 1 year ago #

    Thankyou ClaytonJames. After restarting everything it worked perfectly. I feel like maybe that's one more step on the very long road to knowing what I'm doing!

  4. ClaytonJames
    Member
    Posted 1 year ago #

    You're welcome!

  5. jademcquade
    Member
    Posted 10 months ago #

    My php.ini file only includes the following code;

    ; Maximum allowed size for uploaded files.
    upload_max_filesize = 8M

    ; Maximum size of POST data that PHP will accept.
    post_max_size = 8M

    I restarted WAMP but I am still limited to 2MB. Is the above code all thats needed in php.ini or should there be more there?

Topic Closed

This topic has been closed to new replies.

About this Topic