• Resolved marty1976

    (@marty1976)


    I had saved a custom file in a plugin directory, but it got lost on update.

    I imagine that the plugin update is downloaded, old plugin directory renamed and new plugin unpacked?

    Any chance for me to keep my custom file inside the plugin directory so that it’s still there, even after an update?

    https://ww.wp.xz.cn/plugins/automatic-updater/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Gary Pendergast

    (@pento)

    This isn’t possible with WordPress – plugin upgrades (even when you click the upgrade button manually) happen exactly as you describe.

    If your custom file is PHP, then I’d recommend creating your own custom plugin to contain it. If it’s an image, consider putting it in wp-content/uploads, where it won’t be touched by upgrades.

    Thread Starter marty1976

    (@marty1976)

    Hi Gary, thank you for your fast answer, I had already forgotten that updates had become a core feature…
    I’ll work out a solution, thank you!

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Keep files in plugin directory’ is closed to new replies.