Title: Error on Theme Upload
Last modified: August 20, 2016

---

# Error on Theme Upload

 *  [gingee734](https://wordpress.org/support/users/gingee734/)
 * (@gingee734)
 * [15 years ago](https://wordpress.org/support/topic/error-on-theme-upload/)
 * I get this error when I try to upload my theme:
 * > Warning: fopen(/nfs/c06/h04/mnt/94578/domains/joannycastro.com/html/wp-content/
   > themes/tfg/style.css) [function.fopen]: failed to open stream: No such file
   > or directory in /nfs/c06/h04/mnt/94578/domains/joannycastro.com/html/wp-includes/
   > functions.php on line 4284
   > Warning: fread(): supplied argument is not a valid stream resource in /nfs/
   > c06/h04/mnt/94578/domains/joannycastro.com/html/wp-includes/functions.php on
   > line 4287
   > Warning: fclose(): supplied argument is not a valid stream resource in /nfs/
   > c06/h04/mnt/94578/domains/joannycastro.com/html/wp-includes/functions.php on
   > line 4290
 * I searched the forums and used nearly every solution that seemed suitable. Then
   I redid the coding of the theme making sure everything was up to date and correct
   according to WordPress codex. I don’t know what could be wrong since the functions.
   php file wasn’t touched. Although it says the theme was installed successfully,
   nothing shows up. It’s currently not allowing me to upload the theme when I rename
   the .zip file either.

Viewing 10 replies - 1 through 10 (of 10 total)

 *  [Abinav Thakuri](https://wordpress.org/support/users/abinav/)
 * (@abinav)
 * [15 years ago](https://wordpress.org/support/topic/error-on-theme-upload/#post-2106132)
 * Maybe something on your theme has a conflict with wordpress…or you can try going
   to those lines showed in the error.Sometimes there may be big spaces in there
   that’s caused when uploading the wordpress files through ftp or cpanel.
 *  Thread Starter [gingee734](https://wordpress.org/support/users/gingee734/)
 * (@gingee734)
 * [15 years ago](https://wordpress.org/support/topic/error-on-theme-upload/#post-2106135)
 * I’m sorry, I don’t know what you’re referring to exactly. I don’t know what you
   mean by big spaces. Do you mean time between uploading a theme, where you have
   to wait? Here’s the lines of code from the functions.php file:
 * **4284**
    `$fp = fopen( $file, 'r' );`
 * **4287**
    `$file_data = fread( $fp, 8192 );`
 * **4290**
    `fclose( $fp );`
 * The comment markup talks about opening the file but yea… still no clue to what’s
   wrong. My code is fairy basic since I went by codex too.
 *  [nikart8272](https://wordpress.org/support/users/nikart8272/)
 * (@nikart8272)
 * [15 years ago](https://wordpress.org/support/topic/error-on-theme-upload/#post-2106207)
 * hello gingee734,
 * your error shows that style.css is creating some problems.
 * best to to fully delete that theme via filezilla and than upload vai same.
 * for more help how to…. visit [Link removed – don’t self-advertise. – Mod.]
 *  Thread Starter [gingee734](https://wordpress.org/support/users/gingee734/)
 * (@gingee734)
 * [15 years ago](https://wordpress.org/support/topic/error-on-theme-upload/#post-2106377)
 * When I delete and upload it with Filezilla, the theme still won’t show up. Any
   idea on what could be wrong with the style sheet?
 * It pretty much goes along these lines…
 *     ```
       /*
       Theme Name: ****
       Theme URI: ****
       Description: ****
       Author: ****
       Author URI: ****
       Version: 1.0
       */
   
       body {
       	background-color: #d4cdda;
       	margin:0;
       }
   
       #header {
       	height:125px;
       	background: #2f2f2f url(../images/top-nav.jpg) repeat-y left scroll;
       	position:absolute;
               top:0;
       	left:0;
               width:100%;
               z-index:100;
       }
   
       #logo {
       	float:left;
       	padding-left:60px;
       	padding-top:20px;
       	padding-bottom:20px;
       	padding-right:25px;
       }
   
       #navmenu {
       	margin-top:50px;}
   
       #navmenu ul {
       	list-style-type: none;
       	list-style-image: none;
       }
       ```
   
 * Excluded info marked with “****” – there’s more to it of course.
 *  [Abinav Thakuri](https://wordpress.org/support/users/abinav/)
 * (@abinav)
 * [15 years ago](https://wordpress.org/support/topic/error-on-theme-upload/#post-2106399)
 * add this line to your wp-config.php
    `php_flag display_errors on`
 * load your site again with the theme activated.you should see some errors now 
   and the lines stated.Open up the file shown with the error and there might be
   large spaces near to the line stated there.Delete those spaces.
 * Or there might be real errors on your codes.dont just look at the lines stated..
   look on lines near it.
 *  [Abinav Thakuri](https://wordpress.org/support/users/abinav/)
 * (@abinav)
 * [15 years ago](https://wordpress.org/support/topic/error-on-theme-upload/#post-2106400)
 * I dont see anything wrong with the css.Yet if you’re unnsure you can validate
   your css through this site:
    [http://jigsaw.w3.org/css-validator/](http://jigsaw.w3.org/css-validator/)
 *  Thread Starter [gingee734](https://wordpress.org/support/users/gingee734/)
 * (@gingee734)
 * [15 years ago](https://wordpress.org/support/topic/error-on-theme-upload/#post-2106446)
 * the code: `php_flag display_errors on` shows up as a syntax error. I tried it
   anyway and everything just shows how that line of code is an error. Nothing shows
   up but that error.
 * I set `define('WP_DEBUG', true);` from false to true. And I get a few errors 
   in functions.php without loading the theme..
 *     ```
       Notice: add_option was called with an argument that is deprecated since version 2.3 with no alternative available. in /nfs/c06/h04/mnt/94578/domains/joannycastro.com/html/wp-includes/functions.php on line 3389
   
       Notice: has_cap was called with an argument that is deprecated since version 2.0! Usage of user levels by plugins and themes is deprecated. Use roles and capabilities instead. in /nfs/c06/h04/mnt/94578/domains/joannycastro.com/html/wp-includes/functions.php on line 3387
   
       Notice: has_cap was called with an argument that is deprecated since version 2.0! Usage of user levels by plugins and themes is deprecated. Use roles and capabilities instead. in /nfs/c06/h04/mnt/94578/domains/joannycastro.com/html/wp-includes/functions.php on line 3387
       ```
   
 * Now, the theme is in the theme directory but it’s not showing up. I guess I should
   try to fix the errors above first?
 * My CSS came up with no errors from the validator.
 *  [Abinav Thakuri](https://wordpress.org/support/users/abinav/)
 * (@abinav)
 * [15 years ago](https://wordpress.org/support/topic/error-on-theme-upload/#post-2106449)
 * No they are just notices not errors.just dont worry about them.Its strange the
   code is actually correct.Where did you put it in?It should be placed inside your
   wp-config.php file ..Please check if you did anything wrong..The code is very
   much correct the way i showed you above.
 *  Thread Starter [gingee734](https://wordpress.org/support/users/gingee734/)
 * (@gingee734)
 * [15 years ago](https://wordpress.org/support/topic/error-on-theme-upload/#post-2106451)
 * I put the code at the end of wp-config.php, exactly as written.
 *  [rtrevino9](https://wordpress.org/support/users/rtrevino9/)
 * (@rtrevino9)
 * [14 years, 11 months ago](https://wordpress.org/support/topic/error-on-theme-upload/#post-2106515)
 * gingee734 did you have any luck fixing this issue I’m having the same problem
   with “picturethis” theme from themeforest.net

Viewing 10 replies - 1 through 10 (of 10 total)

The topic ‘Error on Theme Upload’ is closed to new replies.

## Tags

 * [theme upload](https://wordpress.org/support/topic-tag/theme-upload/)

 * 10 replies
 * 4 participants
 * Last reply from: [rtrevino9](https://wordpress.org/support/users/rtrevino9/)
 * Last activity: [14 years, 11 months ago](https://wordpress.org/support/topic/error-on-theme-upload/#post-2106515)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
