• How can I make changes in the WordPress code (not in themes) without them getting overwritten and loosing the changes when updating WordPress?

    Sorry if this is a stupid question…

Viewing 5 replies - 1 through 5 (of 5 total)
  • (if you’re talking about changes in WordPress core) unless you don’t do the upgrades that’s the only way how you can keep everything intact.

    However on other hand why would you change anything in WordPress itself, all that can be done via i.e. functions and saved in different non-WordPress folder. This way you can keep all your stuff untouched and still receive much needed upgrades when they’re available.

    Thread Starter willerud

    (@willerud)

    Yes, I am talking about changes in WordPress core. I guess I’m in a bit over my head here, but I’ve figured out as much that it’s not the best solution to make changes directly to the core files… 😉

    Does this mean that I can copy function files (php) from the WP core to another folder (where/name?) and make changes in these files that will override the core files when running the site (kind of how it works with child themes)?

    Anything can be made custom without editing core directly.

    Thread Starter willerud

    (@willerud)

    Thanks, that’s what I hoped for… 🙂 But how do I do it?

    Well all depends what you want to achieve, but you can start with:

    Plugin API/Hooks
    Some real-life examples

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Make changes in WordPress code not destroyed when updating’ is closed to new replies.