Support » Fixing WordPress » Uploaded file exceeds the upload_max_filesize directive in php.ini

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

Viewing 15 replies - 1 through 15 (of 21 total)
  • try to ask your hosting provider to increase the php memory limit for you.

    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.

    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.

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

    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!

    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?

    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.

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

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

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

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

    …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!





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



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



    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

Viewing 15 replies - 1 through 15 (of 21 total)
  • The topic ‘Uploaded file exceeds the upload_max_filesize directive in php.ini’ is closed to new replies.