[resolved] Style.css and File Permission Error (11 posts)

  1. Webmeba
    Posted 7 years ago #

    Just a quick simple question.

    My WP blog located at http://www.webmeba.com is as you can see without any styles.

    The code the I use in my header.php to link to the style sheet is:

    <link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" media="screen" /

    I was toying around with permissions with a subdomain of mine, so that might have broken it, somehow.

    Any ideas what I should do? style.css does exist and the blog worked just moments ago. If it is connected to file permissions, what kind of permissions should I set to files such as public_html, or wp-content, or wp-themes....

  2. Kafkaesqui

    Posted 7 years ago #

    Well, trying to access any files directly in your theme directory does not generate a permission error like I would expect but rather a server 500 error, which is too generic to diagnose blind. You should contact your host about this.

    In the mean time, you can certainly check on permissions to your files and directories:


    Files should only need to be read, directories read and execute.

  3. Webmeba
    Posted 7 years ago #

    Thanks for the help, it helped a lot, i don't get the 500 error anymore now :)

    Yet i still have a problem, my site is not rendering my style.css. When trying to access a theme file i get this error now

    Fatal error: Call to undefined function get_header() in /home/webmzuk6/public_html/wp-content/themes/Webmeba2/index.php on line 1

    line 1 happens to be

    <?php get_header(); ?>

    style.css is still there, header.php is there, I'm linking properly to it for all I know and the permissions are now correct, I even had a person from my hosting company check them.

    I'm still linking to the style.css like this in my header.php

    <link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" media="screen" />

    Any ideas now :S?

  4. Kafkaesqui

    Posted 7 years ago #

    Sorry, still getting the 500 error when trying to reach files from your theme such as reset.css (or style.css, or index.php).

    The fatal error is not fatal at all here. In fact it's expected. Theme templates (the PHP documents at least) are not meant to be accessed directly.

  5. Webmeba
    Posted 7 years ago #

    Right, good point on PHP documents.

    But, when I try to access reset.css (via http://webmeba.com/wp-content/themes/Webmeba2/reset.css) I get the raw rest.css with all of its css code.

    When I try to access style.css (via http://webmeba.com/wp-content/themes/Webmeba2/style.css)
    I get my custom 404.

    I link to my reset.css like this:

    <link rel="stylesheet" type="text/css"
    href="http://test.webmeba.com/wp-content/themes/Webmeba2/reset.css" />

    And I link to my style.css as mentioned before

  6. Kafkaesqui

    Posted 7 years ago #

    I am now getting the files instead of the server error, which is a good thing!

    I see your references to style.css and reset.css in the <head> of your home page, but the former points to webmeba.com (and generates a 404), whereas the latter is aimed at test.webmeba.com (and the fun 500 error).

    This exists:

    This, not so much:

  7. Webmeba
    Posted 7 years ago #

    I'm at the brink of jumping off a cliff while hysterically laughing you know :D?

    Look at this http://webmeba.com/wp-content/themes/Webmeba2/images/wpforums1.bmp
    I see style.css, do you? I also see reset.css!

    But why does style.css exist, when it doesn't *laugh*.

  8. Kafkaesqui

    Posted 7 years ago #

    "I'm at the brink of jumping off a cliff while hysterically laughing you know"

    Been there many time. I have to stop and buy the t-shirt next time... ;)

    Instead of the typical steps *I* would take here, try making an exact duplicate of style.css (let's call it webmeba.css), upload that and see if your server thinks it's invisible.

  9. Webmeba
    Posted 7 years ago #

    I honestly believe my server is turning into a HAL 9000...

    Yes well, I've done what you said and uploaded webmeba.css

    You can find it here: http://webmeba.com/wp-content/themes/Webmeba2/webmeba.css

  10. Kafkaesqui

    Posted 7 years ago #

    Since we've caught HAL during his nap, perhaps if you now modify your template to call this instead of style.css:

    <link rel="stylesheet" href="<?php bloginfo('stylesheet_directory'); ?>/webmeba.css" type="text/css" media="screen" />

    Then you can at least pause for a bit (and perhaps some medication for that giggling) before dealing with the style.css zombie.

  11. Webmeba
    Posted 7 years ago #

    Great! Thanks, it worked, and I didn't throw myself off a cliff, yet.

    Thanks for the help again.

Topic Closed

This topic has been closed to new replies.

About this Topic