1

when I try to upload a theme I have uploaded on a free host and it is the first time I upload a theme on a host, I got this error failed because The style.css stylesheet doesn’t contain a valid theme header.

then I put this on my styles.css , but still getting this error , although the theme works very well on the localhost. what should I do, please?

/*
    Theme Name: shah
    Author: shah
    Author URI: http://shah.gq
    Description: Wordpress Theme
    Version: 1.0
*/
  • 1
    Themes require a style.css file with this header. Your question mentions a styles.css file, plural, which is incorrect. – Jacob Peattie Jun 5 at 15:01
  • thanks for comment, I changed it, but still getting the same error – social Jun 5 at 15:11
  • Try removing the white space from the beginning of each line. And make sure it’s at the very top. – Jacob Peattie Jun 5 at 15:13
  • changed it , but still getting the same error – social Jun 5 at 15:19
  • Just try by coping all the theme header from here(developer.wordpress.org/themes/basics/main-stylesheet-style-css) and add the your needed things in header. Some of the hosts check for the params in that header like Theme URI, Author URI etc. May be blocking those things to you. – Baikare Sandeep Jun 5 at 15:54
0

Remove extra space from the header. Try like bellow:

/*
Theme Name: shah
Theme URI: 
Author: shah
Author URI: http://shah.gq
Description: Wordpress Theme
Version: 1.0
*/
| improve this answer | |

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.