My "style.css" got erased.

  • Unknown's avatar

    I keep the changes I’ve made to the file in a separate file on my computer, so if I can get the default style.css back, I can put my changes back. However, I was in the middle of experimenting with some minor changes to the “style.css” file when WordPress “automatically updated” my WordPress from 5.0 to 5.1.

    I didn’t know that the update had occurred when I clicked “Save,” and got a “nonce_failure.” I refreshed the page expecting to be back to the file’s state before I made changes, but ended up with a completely blank style.css file.

    I’ve searched for a replacement style.css file that I could copy and paste using the theme editor, but I can’t find it. Would someone here in this forum have the original, unaltered style.css file that I could use to put my blog back together? Presently it looks ridiculous with absolutely no styles defined…

    Please help. Considering the types of changes I’ve made to the theme, reinstalling libretto is really not an option….

    Thanks,

    Erin A. Thomas

    The blog I need help with is: (visible only to logged in users)

  • Unknown's avatar

    Because I came to this forum via the Libretto theme’s profile page, I was under the impression this was a support forum for Libretto itself. I just wanted to follow-up and clarify that I’m looking the “style.css” file for Libretto.

    If anyone can help, I’d desperately appreciate it.

    Thanks,

    EAT

  • Unknown's avatar

    Hi There,

    I understand that you are in a critical situation. You can download Libretto theme here
    https://wordpress.org/themes/libretto/
    After extracting zip file, you can get a fresh copy of the stye.css file.

    However, the URL provided by you seems self-hosted WordPress site. This forum provides assistance to the only site hosted on WordPress.com.

    You would get help at the below forum:

    https://wordpress.org/support/

    Further to know more about the differences between WordPress.com and WordPress.org you can read this document:

    https://en.support.wordpress.com/com-vs-org/

  • Unknown's avatar
  • Unknown's avatar

    Thanks for the links. I think once I reconstitute the style.css file, I’ll be alright. I just can’t believe WordPress would allow something like this to occur…

  • Unknown's avatar

    Seems I didn’t keep track of everything in the other file. There was a gradual accumulation of small changes… Now it’s back to square one for a number of customizations. I wish backups were created of theme files the way they are of posts you’re working on.

    I still can’t believe the file was wiped upon updating it after not realizing WP upgraded behind the scenes… Completely asinine.

  • Unknown's avatar

    It’s crazy how much has been undone. It’s going to take me weeks to months to figure out what all has been zapped and to relearn how to put everything back the way it was.

    I never would have thought something like this could happen. Up until now, not one thing has ever happened that gave me even a little suspicion that something like this was possible. Imagine, I just modified a not() selector and saved–*poof*. Everything gone. Everything.

  • Unknown's avatar

    I completely understand how frustrating that is. Although this isn’t an issue with WordPress.com so it’s difficult to help here, in future, I would recommend exporting your theme regularly when you make significant progress on it. I use this plugin to do so: https://wordpress.org/plugins/wp-theme-exporter/

    For CSS changes, unless you’re making a theme, I’d generally recommend using the Customizer to prevent things like this happening: https://codex.wordpress.org/CSS

    Unfortunately, I can’t really offer more advice on recovering what’s been lost. It’s definitely frustrating, and I’m sorry this has happened. :(

  • Unknown's avatar

    The CSS customizer couldn’t handle the complexity. :-/

    Yes I’m now editing the style.css file on my computer and copy/pasting over to WP. It’ll be a while before I put all the lost CSS back. It’s mostly a matter of not having the time, especially since I’ll have to relearn some of the tricks I used…

  • Unknown's avatar

    Just wanted to follow up.

    I’ve gotten all my CSS customizations back in. I think. A lot of what I’ve implemented this time is much better than before, which is nice. I actually had my left thyroid removed just a few days after the initial post. Brain has been working better ever since.

    The built-in WordPress CSS customizer can’t handle the complexity of what I do. The styles I create are pretty involved.

    For instance, custom lists using <div> tags instead of

  • Unknown's avatar

    Nuts. I guess I should have closed the and

      tags in the post above.

    1. Unknown's avatar

      I see. Maybe I should have put them in square brackets? [div] and [ol]?

    • The topic ‘My "style.css" got erased.’ is closed to new replies.