WordPress.org

Ready to get started?Download WordPress

Forums

Very sad updating problem. (21 posts)

  1. Shortman
    Member
    Posted 4 years ago #

    You know... *sigh*... I'm so tired to customize the blog after each update. Can at least someone of developers think about this? I'm so tired to customize my themes every (very frequently) update. Is there any ideas about updating only CHANGED part of the code? You could use SVN-like system, or... *sigh*. I don't know. Just stop this despondent mess, please. I beg you.

  2. Make a child theme? Right now all my themes are child themes (since my edits are few and mostly related to color and images) and I've found it to be a wonderful tool.

    http://themeshaper.com/how-to-protect-your-wordpress-theme-against-upgrades/

  3. Shortman
    Member
    Posted 4 years ago #

    i've read this thing, and that's not that i want. What if i changed the code? Yes i agree, after update the style.css will not be touched, but php files, that i customized will be updated even if code wasn't changed in some files. Also, i said about core updater too.

  4. iridiax
    Member
    Posted 4 years ago #

    I'm so tired to customize the blog after each update.

    If you are using a modified version of the default or classic theme, make a copy of it, give its directory a new name, rename it in its style.css, and then switch to it. Now upgrades won't overwrite it.

  5. Shortman
    Member
    Posted 4 years ago #

    Oh, you mean this operations will keep my changed php files and after update only changed files will be updated? I think no.

  6. iridiax
    Member
    Posted 4 years ago #

    WordPress will only overwrite themes in the /default/ or /classic/ theme directories. If you are referring to updates of other WordPress themes overwriting your theme changes, then use a child theme (as suggested) or switch to a different theme since most non-official WordPress themes don't update very often (or at all).

    If you are modifying core WordPress files, then upgrades will overwrite your changes, which is a major reason why editing these files is not recommended.

  7. Shortman
    Member
    Posted 4 years ago #

    *pfffffffff*

  8. Shortman
    Member
    Posted 4 years ago #

    Okay, i'll agree with core changes protection. But about themes. My changed php files will keep? Or just things about style.css?

  9. WordPress will only overwrite themes in the /default/ or /classic/ theme directories.

    If you copy /default to /mydefault, it will NEVER GET OVERWRITTEN

    But honestly, if all you're doing is making a couple PHP file changes and a style.css, you could make /mydefault a child of /default and your PHP and CSS would always override the /default :) I swear, it works! Even your changed PHP files always override the parent. I do it on three themes, happily.

  10. @Ipstenu: I got the feeling Shortman was talking about automatic theme updates, but your advice is the same either way.

  11. Right, that's what I said :) If you copy the theme to a new folder, it never gets updated. Nothing. Not PHP, not CSS, not an image, not even the 'buggerallthis.txt' file you put in as a joke for a friend... and yes, I did once.

    If you update it in the folder it came in (i.e. make changes in /default for your theme) then when they update the theme, you lose your changes.

    So the answer is simple: NEVER update core or theme directly! Use functions or a plugin for core, and copy/child the theme :)

  12. Shortman
    Member
    Posted 4 years ago #

    What plugins for core could you advice?

  13. Depends what you want to change :)

  14. Shortman
    Member
    Posted 4 years ago #

    I change anything i dont like in my blog, so i want to see everything you can offer.

  15. I can't answer that. No one can. Why? What you don't like and what I don't like are vastly different. I hate curly 'smart' quotes, self-trackbacks/pings, single spaces after periods that end sentences, and dark backgrounds. You may like those.

    So ... yeah. Figure out what, specifically, you want to change and then ask about that. I'm confident that there is a plugin or function hack for 90% of it. And if not, people can sort out a way to do it.

  16. Shortman
    Member
    Posted 4 years ago #

    Frequently i change only themes (php code, style.css, images etc), and i want to keep my modified code, but also i want to keep their updates. For first example:
    I have downloaded a new theme with files index.php, single.php, archives.php and installed it.
    I've changed some code in archives.php. After some time theme update has came out, which includes archive.php and index.php updates. Can i update this files without touching my modified code?

    Second example:
    ...After some time theme update has came out, which includes index.php and single.php updates. Can i keep my modified archive.php without updating the whole theme? (Because core updates not updated files)

  17. First example: Yes. If you make a NEW theme (that is copy a theme to a new folder and change that, OR via child theming), then YOUR theme will NEVER be overwritten.

    Second example: Again, yes.

    Seriously, I don't know what other way to tell you this, and two (three!) of us have told you. YOUR themes, in their OWN folder, be they a total copy of the parent theme OR a child theme of the parent, will NEVER EVER be overwritten by either the WP upgrade OR the parent theme upgrade.

    By 'core' what we meant was 'The core CODE that makes up WP.' Not the themes.

    Core = code, and can be overwritten by plugins and functions you put in your theme.
    Themes = look/feel of your site, and can be customized and never overwritten, by child themes or theme copying.

  18. Shortman
    Member
    Posted 4 years ago #

    Thanks

  19. Shortman
    Member
    Posted 4 years ago #

    Strange. I copied the default theme, wrote "template: default" in copied theme's css and after applying it, only whitespace appeared. What's wrong? Maybe i need just to copy default, rename it and modify the renamed?

  20. Re-read http://themeshaper.com/how-to-protect-your-wordpress-theme-against-upgrades/

    You may also want to read this: http://op111.net/53

    Did you import the default CSS with @import url('../default/style.css'); as the first line below the header?

    The header should be something like this:

    /*
    Theme Name: Shortman Default
    Theme URI: http://yourdomain.com
    Description: My hack of the default theme
    Author: Shortman
    Author URI: http://yourdomain.com
    Template: default
    Version: 1.0
    .
    General comments/License Statement if any.
    .
    */
    
    @import url('../default/style.css');

    Did you copy over ALL the files or just the ones you changed? (you only need to copy over the ones you change).

  21. Shortman
    Member
    Posted 4 years ago #

    (you only need to copy over the ones you change)

    You say it like my copied modified files will not be merged with updated files from parent theme in future, but they will only replace them. Stupid system.

Topic Closed

This topic has been closed to new replies.

About this Topic