I am getting an error message When uploading some themes .

Warning: fopen(/home/..../public_html/...../wp-content/themes/creativeart/style.css) [function.fopen]: failed to open stream: No such file or directory in /home/...../public_html/...../wp-includes/functions.php on line 4165

Warning: fread(): supplied argument is not a valid stream resource in /home/...../public_html/...../wp-includes/functions.php on line 4168

Warning: fclose(): supplied argument is not a valid stream resource in /home/...../public_html/...../wp-includes/functions.php on line 4171

What does it mean ?I don't understand if the problem in themes or Am I missing some thing in my Wordpress Installation? I have tried the same themes in two wordpress installations and got the same error .

I am listing some of themes here .



Does any one have idea on such error?

  • The problem was with the themes I tried .It is ok with other themes .
    – Name-AK
    Sep 30, 2010 at 2:18

1 Answer 1


From the looks of things, it's a server issue. The WordPress theme uploader uses fopen() to transfer files from one location to the server. It looks like there's a timeout or access error because a) fopen can't find the file that it's supposed to be transferring and b) the fread and fclose functions can't find the data stream to read the file and close it.

I would recommend manually uploading the themes instead to bypass this error. Instead of uploading the .zip file via WordPress, do the following:

  1. Unzip the theme folder somewhere on your local machine
  2. Log in to your site's FTP system
  3. Navigate to /wp-content/themes/
  4. Use FTP to transfer the entire theme folder from your local machine to the server

This will entirely bypass any kind of fopen/fread/fclose errors you're getting. If there's still a problem, then it's an issue with either your server, your WordPress installation itself, or the actual theme and will require some more in-depth troubleshooting.

  • I forgot to tell onething .The error used display as soon as it uploads theme and before activating the theme.The themes used able to work at that time even though they show error . I am getting an error "The active theme is broken. Reverting to the default theme." when uploading but it is actually working well when I click on activate again .Now after getting your reply I have tried deleting the previous ones and uploading them via file manager and got no errors. By the way I am trying this on two installations which are on different servers and hosting companies as well .
    – Name-AK
    Sep 13, 2010 at 16:06
  • OK, if the themes were already present on the server when you tried to upload them, that's what was causing the error. The uploader isn't designed to overwrite existing themes ... though I've heard that's a planned feature for the future ...
    – EAMann
    Sep 13, 2010 at 16:16
  • Sorry for not making clear .There were not already on the server .I am not trying to replace existing ones.I am trying to tell you that the error exists but the theme is works well .
    – Name-AK
    Sep 13, 2010 at 18:29
  • So do you get the error while uploading the themes (as your question states) or after the theme are uploaded?
    – EAMann
    Sep 13, 2010 at 18:41
  • Sorry for not making clear by myself .This is the screen shot of error imgur.com/xZVvT.jpg
    – Name-AK
    Sep 13, 2010 at 19:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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