WordPress.org

Ready to get started?Download WordPress

Forums

Editing Plugins without losing changes on upgrade (4 posts)

  1. petriknz
    Member
    Posted 1 year ago #

    With the themes we can create a child theme so that changes we make do not get lost on an upgrade. Is it possible to do a similar thing with the plugin files? I need to change some files in a plugin but do not want to lose the changes every time I update.

  2. michael.mariart
    Member
    Posted 1 year ago #

    No. Plugins don't work that way. It would be a nice idea, but it hasn't been implemented.

  3. prejudice
    Member
    Posted 1 year ago #

    i'm thinking is it possible to make the edited file in plugin not writable. so it won't get updated in upgrade...

  4. michael.mariart
    Member
    Posted 1 year ago #

    That is possible, but it could also break the update process. If a file is suppsoed to be over-written and it can't be it will throw an error and the site will either show that error and the update will fail or it will just die.

    Even if it did work, there's also other problems can can happen if the file that you block from being editable contains the version numbers or anything else that's needed by the system. If you stop the version numbers updating in the system so you'll be asked to upgrade again, and again, and again... There's a lot of other things that can go wrong too.

Topic Closed

This topic has been closed to new replies.

About this Topic