• Hi all,

    I am trying some edits to my CSS – I understand I need to backup my original CSS before doing so.. I see a lot of people saying that it is highly recommended to create a child theme in advance of this.

    My question is could I not just create a .txt back up of the style.css (in /../wp-admin/theme-editor.php)? If I did this periodically throughout the changes I am making, wouldn’t I have a series of CSS versions I could revert back to by just pasting back the into that “Edit themes” box, in case anything goes wrong?

    If anyone has any idea, would greatly appreciated..

    Thanks!
    Torz

Viewing 3 replies - 1 through 3 (of 3 total)
  • On a technical level, I don’t see anything wrong with this plan. But consider that depending on the theme, you may not want to completely overwrite all of the CSS on each update. For example, a theme update may add some new features and some corresponding CSS, and overwriting the entire stylesheet means you would lose the styling for the new features.

    Thread Starter torzmanian dev

    (@torzmanian-dev)

    Thanks for the speedy reply! I think that makes sense – I am not super concerned about the theme feature updates so at this point I don’t think should be a factor.. Just so I understand the Child theme – are updates by the theme author basically the only reason that one would use the Child theme backup method? I’m obviously new to this, but is there anything else that would get backed up with the Child theme method that wouldn’t via my .txt method… do edits to the CSS affect any other files – e.g. php, html etc (I mean in a way that could cause a WordPress issue — obviously the CSS affects the HTML upon browser rendering).

    Thanks again, and also sorry for the typos — have had my eyes on the screen for a bit too long now;)

    -Torz

    A child theme isn’t really intended to be used as a backup method, per se. The reason people recommend making a child theme before making edits to your CSS is so you won’t lose your changes when/if the theme is later updated. You can also use a child theme to override PHP files from the parent theme: WordPress will use any PHP files from your child theme first and use the parent theme’s files as a last resort.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘CSS backup vs Child Theme’ is closed to new replies.