1

I have configured Wordpress locally on my system(Windows 7 professional). I want to upload a theme to test it, but whenever I tried to upload the theme with more the 1MB. It shows me the error which read as:

The uploaded file exceeds the upload_max_filesize directive in php.ini.

As per stackexchange's previous question answers I made a text file renamed as php.ini with code and pasted in Wp-admin folder but still it is not working. The added code to the file is mentioned below:

memory_limit = 32M
upload_max_filesize = 32M
post_max_size = 32M
file_uploads = On

but still getting the same error. What to do?

1 Answer 1

1

A php.ini in your WordPress directory has no effect if PHP is running as a service, not per CGI or FastCGI.

Find the php.ini in your PHP installation path, adjust the values there and restart PHP and your web server.

So … until here this was off topic because general PHP questions belong to Stack Overflow. ;)

But:

memory_limit = 32M

That's very low for WordPress. Just think about an image that has to be resized – this will probably not work if the image is rather big. Translation is rather expensive too. I don't many German blogs which are able to run with such a low value.

Set this value to 128M or more.

3
  • Thanks for the answers! I understand this should be a stackoverflow question, but since you answer it and am facing the problem with wordpress so I posted here. I searched for the php.ini file in my wordpress folder but can't find php.ini file. I am trying to upload a theme to my blog. Please guide. Commented May 14, 2012 at 14:29
  • The php.ini is not in your WordPress directory, is is in your PHP install path.
    – fuxia
    Commented May 14, 2012 at 14:31
  • Thanks again for mentioning that. I figured out the file in wampserver, but still after updating the file to 256M am getting the same error while uploading a 3mb theme. Commented May 14, 2012 at 15:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.