• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

CSS doesn't work on Localhost

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password

Community Forums › Forums › Archived Forums › General Discussion › CSS doesn't work on Localhost

This topic is: resolved

Tagged: css not working, localhost, mac, mamp

  • This topic has 18 replies, 3 voices, and was last updated 9 years, 9 months ago by cdils.
Viewing 19 posts - 1 through 19 (of 19 total)
  • Author
    Posts
  • June 25, 2013 at 10:52 am #47674
    MM
    Member

    Hi,

    Have cloned and setup my site on a localhost (on mac / mamp). However site only displays the html. The theme and CSS doesn't work. I've tried clearing caches, but nothing changed. Has anyone experienced this or able to suggest an answer here?

    Thks.

    June 26, 2013 at 6:24 am #47760
    cdils
    Participant

    Hi,

    What child theme are you using? Unless you've modified the default method for calling in the style sheet, there's no reason it shouldn't work in local environment.

    Make sure there's a style.css file in your theme's root directory, otherwise your theme will not work.

    Carrie


    Have you been helped in this forum? Pay it forward and answer someone else’s question. I bet you’ll know the answer to at least one question. 🙂

    I host a weekly WordPress-focused podcast called Office Hours. I tweet @cdils.

    June 26, 2013 at 6:30 am #47762
    MM
    Member

    Thks Carrie. Using Epik theme and yes, style.css is definitely there - so unsure why it doesn't work.

    June 26, 2013 at 6:52 am #47764
    cdils
    Participant

    When you say the theme doesn't work... Are you able to successfully activate Epik or does that cause the site to break?

    Can you activate one of the default themes (Twenty Eleven / Twenty Twelve, etc.) with any success?


    Have you been helped in this forum? Pay it forward and answer someone else’s question. I bet you’ll know the answer to at least one question. 🙂

    I host a weekly WordPress-focused podcast called Office Hours. I tweet @cdils.

    June 26, 2013 at 7:03 am #47767
    MM
    Member

    Good tip. Just tested and no, 2012 theme isn't successfully activating the CSS.

    I had previously tested both Epik and 2012 on a live site and they worked fine.

    ?

    June 26, 2013 at 8:03 am #47774
    Trisha
    Member

    So to be clear your html generated by WordPress is working it is only the CSS that is not working?

    When you view the source for your page does it display a link to the CSS at all?


    I tweet as @trishawebs

    “Make New Mistakes. Make glorious, amazing mistakes. Make mistakes nobody’s ever made before.” ~ Neil Gaiman

    June 26, 2013 at 8:08 am #47777
    MM
    Member

    Thks Trisha.

    Yes, html elements showing (i.e. blue links, images, menu & footer words) but zero styling.

    I look at the page source and found no link to style.css

    June 26, 2013 at 8:34 am #47783
    cdils
    Participant

    Sounds like there's something funky with the WordPress install. I'd try downloading a fresh copy of WordPress, just in case. You don't have to go through the installation process again - just replace the wp-admin and the wp-install folders and files (don't replace wp-content) with your fresh ones and see if that works.

    p.s. You can replace the root files too except for wp-config.php. 🙂


    Have you been helped in this forum? Pay it forward and answer someone else’s question. I bet you’ll know the answer to at least one question. 🙂

    I host a weekly WordPress-focused podcast called Office Hours. I tweet @cdils.

    June 26, 2013 at 9:49 am #47800
    MM
    Member

    Thanks Carrie but that didn't work either. I tried replacing as suggested, and also even ran Duplicator again.

    Still no CSS. I'm confused as to why theme CSS works fine on my live site but no themes work on my localhost.

    June 26, 2013 at 11:06 am #47810
    Trisha
    Member

    This is a very strange thing.

    If you create a completely fresh WordPress site on your localhost does that CSS work? (Unfortunately I am trying to help you from XAMP - the Windows version of MAMP).

    Have you modified anything in the header.php of the theme?


    I tweet as @trishawebs

    “Make New Mistakes. Make glorious, amazing mistakes. Make mistakes nobody’s ever made before.” ~ Neil Gaiman

    June 26, 2013 at 1:50 pm #47830
    MM
    Member

    Thks Trisha. I just installed a basic site with 2012 theme - and the CSS / layout looks fine.

    I then loaded Genesis parent and Epik child theme into the new Localhost - CSS appeared on the 'hello world' post.

    Strange? It just doesn't seem to work when connecting my actual database with lots of existing posts / pages.

    June 26, 2013 at 2:14 pm #47834
    cdils
    Participant

    Oh, that's interesting to note that it works with sample database, but not your imported data.

    What if you exported your database using the native WordPress export and then brought it in to your new installation. (Assuming that was not your clone method originally?).

    Isn't troubleshooting fun? 🙂


    Have you been helped in this forum? Pay it forward and answer someone else’s question. I bet you’ll know the answer to at least one question. 🙂

    I host a weekly WordPress-focused podcast called Office Hours. I tweet @cdils.

    June 26, 2013 at 3:03 pm #47856
    MM
    Member

    Thks Carrie - yes it's weird (and sorta fun!). Will try export / imports and seeing if I can get CSS working with old database content... stay tuned 😉

    June 27, 2013 at 4:05 am #47987
    Trisha
    Member

    Hi MM,

    In your debugging mission I would consider opening the source of the two installs side by side and comparing the head section of the source. I am very surprised that it is with the database that is de-activating your CSS since that should generally be a feature of the functions (php) and not the database (mySQL).

    As Carrie says the wild adventurous world of troubleshooting.


    I tweet as @trishawebs

    “Make New Mistakes. Make glorious, amazing mistakes. Make mistakes nobody’s ever made before.” ~ Neil Gaiman

    June 27, 2013 at 4:16 am #47989
    MM
    Member

    Hi Carrie,Trisha,Others

    Here's the results... I was able to connect the existing database onto the new WP installation's site folder, on Localhost.

    BUT... again there's no CSS working on the login screen or the front end. No idea - this could make changes quite tough.

    June 27, 2013 at 4:41 am #47991
    MM
    Member

    Hi Trisha - I'm a WP rookie but if you mean compare page source of live site vs localhost...

    I found these page source differences via diffchecker - http://diffchecker.com/3x74ilka

    (Most seem to be the domain link though?)

    Using diffchecker again, it says the two functions.php files are identical. Is that an issue?

    June 27, 2013 at 4:53 am #47992
    MM
    Member

    In case it helps any ideas... here's what it looks like

    https://www.dropbox.com/s/qmh1rekw3pyxmla/Screen%20Shot%202013-06-27%20at%2011.50.53.png

    June 27, 2013 at 9:55 am #48040
    MM
    Member

    Carrie and Trish - thanks for all the help. Cory (Plugin Author of Duplicator) found the problem. I was using WP-Minify plugin. Even though all other caches (W3 Total) had been cleared, WP-Minify hadn't. For anyone with this problem, just deactivate the plugin to clear the cache and your localhost CSS should now display.

    June 27, 2013 at 11:18 am #48071
    cdils
    Participant

    Mystery solved! Glad you got it working. 🙂


    Have you been helped in this forum? Pay it forward and answer someone else’s question. I bet you’ll know the answer to at least one question. 🙂

    I host a weekly WordPress-focused podcast called Office Hours. I tweet @cdils.

  • Author
    Posts
Viewing 19 posts - 1 through 19 (of 19 total)
  • The topic ‘CSS doesn't work on Localhost’ is closed to new replies.

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2023 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble