Title: Keep files in plugin directory
Last modified: August 21, 2016

---

# Keep files in plugin directory

 *  Resolved [marty1976](https://wordpress.org/support/users/marty1976/)
 * (@marty1976)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/keep-files-in-plugin-directory/)
 * 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://wordpress.org/plugins/automatic-updater/](https://wordpress.org/plugins/automatic-updater/)

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

 *  Plugin Author [Gary Pendergast](https://wordpress.org/support/users/pento/)
 * (@pento)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/keep-files-in-plugin-directory/#post-5085171)
 * 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](https://wordpress.org/support/users/marty1976/)
 * (@marty1976)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/keep-files-in-plugin-directory/#post-5085175)
 * 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.

 * ![](https://s.w.org/plugins/geopattern-icon/automatic-updater.svg)
 * [Advanced Automatic Updates](https://wordpress.org/plugins/automatic-updater/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/automatic-updater/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/automatic-updater/)
 * [Active Topics](https://wordpress.org/support/plugin/automatic-updater/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/automatic-updater/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/automatic-updater/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [marty1976](https://wordpress.org/support/users/marty1976/)
 * Last activity: [11 years, 11 months ago](https://wordpress.org/support/topic/keep-files-in-plugin-directory/#post-5085175)
 * Status: resolved