WordPress.org

Ready to get started?Download WordPress

Forums

Uploaded file exceeds the upload_max_filesize directive in php.ini (22 posts)

  1. wordprezzer
    Member
    Posted 2 years ago #

    Hi,

    I'm trying to install a theme but I have an error message saying:
    "The uploaded file exceeds the upload_max_filesize directive in php.ini"
    This is simply a lie as I'm trying to install it on my localhost, so no limit for upload filesize!

    Why and how to fix it?
    Any idea?
    Thanx

  2. RichardWPG
    Member
    Posted 2 years ago #

    try to ask your hosting provider to increase the php memory limit for you.

  3. jnhghy
    Member
    Posted 2 years ago #

    Or you can use FTP:
    Download the theme archive/files on your local computer and upload the files in the theme folder ->wp-content/themes
    Then you will have the theme in your Dashboard and you can activate it from there.

  4. wordprezzer
    Member
    Posted 2 years ago #

    I'm in localhost, Sir! :)
    I have 500 Go of disk space!
    My WordPress installation is in localhost, not in webserver host.
    The error happens only with certain theme, not always.

  5. wordprezzer
    Member
    Posted 2 years ago #

    Is it possible that the developer of theme restrict his theme?

  6. wordprezzer
    Member
    Posted 2 years ago #

    Sorry jnhghy, I didn't see your post. We posted at the same time!
    I tried to install the theme from a downloaded file but I have the same error!

  7. jnhghy
    Member
    Posted 2 years ago #

    ok, 1st of all the php upload_max_filesize directive is a limitation of the file size that you can upload it has nothing to do with the space that you have on your hardisk. if you are localhosted then you can just copy the theme files in your website, what OS are you using? linux?windows?mac?

  8. wordprezzer
    Member
    Posted 2 years ago #

    Thanks.
    I'm using windows.
    The problem happens only with some themes, not with all.
    I'll try to upload the file manually and see if it solves the issue.

  9. jnhghy
    Member
    Posted 2 years ago #

    Different themes have different file sizes try it and let us know it it worked.

  10. wordprezzer
    Member
    Posted 2 years ago #

    It is ~ 3 Mo.
    It doesn't work when I place it manually in the themes folder.
    Weird!

  11. d.maksad
    Member
    Posted 1 year ago #

    Hey wordprezzer,
    I had the same problem, and I solved it.

    if you are using wamp for your localhost then click on the wamp green icon that is running and press on PHP directory, then you will see php.ini file

    if you dont use wamp software, then just find the php.ini file and open it. and search for upload_max_filesize. you should find rows like the bellow one:

    ; Maximum allowed size for uploaded files.
    ; http://php.net/upload-max-filesize
    upload_max_filesize = 2M

    by default the upload_max_filesize is 2 megabyte. Just simply change it to
    upload_max_filesize = 200M (200 megabyte)

    then save your php.ini file and restart your services and it will work without any diverticulitis :)

  12. zcamine
    Member
    Posted 1 year ago #

    hi all
    i'm using easyphp for my local host
    to get rid of this problem
    thanks

  13. reidy68
    Member
    Posted 1 year ago #

    ...cheers d.maksad! just started using wp and using a localhost to work on themes before uploading to the server and your solution was the easiest that i've googled so far! for the wp noobie, this is perfect! worked first time! thanks for saving my brain ache!

    cheers!

    rich

  14. gatana
    Member
    Posted 1 year ago #

    d.maksad: thanks a bunch. i stopped the wamp, adjusted the upload size to 100m and all the themes that didn't load before worked. thanks a bunch, hope more people can figure this out.

    Just started teaching myself wordpress today and im not an established web designer, any pointers or templates that you can share??

  15. danielng
    Member
    Posted 1 year ago #

    Hi d.maksad,

    Appreciate your helpful tip as I was straining my eyes to find which line of code in the php.ini file to solve the problem. I googled and found your answer.

    Just want to say 'thank you'.

  16. Zuby
    Member
    Posted 1 year ago #

    very simple solutions if you trying to install theme just copy your theme and pate into the wp-contant folder C:\wamp\www\wordpress\wp-content;
    then go to deshboard and see in themes your theme will show there

  17. iammary
    Member
    Posted 1 year ago #

    Hi!

    I know it's kinda late but in case this happens, the easiest solution would be to copy your theme to your wp-content folder.

    In my case, I use xampp, so here's how this works:
    1. Go to C:\Xampp\htdocs\yoursitename\wp-content\themes
    2. Paste your theme.

    You can find it in your dashboard once you login to localhost/yoursitename/

    Go to themes and activate.

    Good luck!

  18. gnfb
    Member
    Posted 1 year ago #

    Oh God I love it when somone gives a solution and it works without reinventing the wheel Thanks to all

  19. vector88
    Member
    Posted 1 year ago #

    Thank you very much for this question and answer wordprezzer , d.maksad .

    i have almost giveing up useing wordpress on local host for Ecommerce theme untill i found this.

    Thank you.

  20. Mardwan
    Member
    Posted 1 year ago #

    d.maksad Your the man!!! Thank so much :)

  21. d.maksad
    Member
    Posted 1 year ago #

    Hello everybody,
    I am really glad that this solution helped lots of you.
    That's a great plasure ))

  22. lpace
    Member
    Posted 1 year ago #

    I am unable to install this plugin in the usual fashion, having gotten the error message: wordpress "The uploaded file exceeds the upload_max_filesize directive in php.ini."

    Therefore, I have used FTP and uploaded the (unzipped) plugin folder the-events-calendar to my site's plugin folder.

    My question is: should I leave the two interior zip files as is?
    They both appear to contain fonts:
    the-events-calendar/vendor/fpdf/font/opensans.zip
    the-events-calendar/vendor/fpdf/font/steelfish.zip

    Thanks,
    L

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.