Forums

Make changes in WordPress code not destroyed when updating (6 posts)

  1. willerud
    Member
    Posted 1 year ago #

    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...

  2. Emil Uzelac
    Member
    Posted 1 year ago #

    (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.

  3. willerud
    Member
    Posted 1 year ago #

    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)?

  4. Emil Uzelac
    Member
    Posted 1 year ago #

    Anything can be made custom without editing core directly.

  5. willerud
    Member
    Posted 1 year ago #

    Thanks, that's what I hoped for... :-) But how do I do it?

  6. Emil Uzelac
    Member
    Posted 1 year ago #

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

    Plugin API/Hooks
    Some real-life examples

Topic Closed

This topic has been closed to new replies.

About this Topic