[resolved] How to prevent folder under my plugin from being deleted/replace while update? (3 posts)

  1. takien
    Posted 2 years ago #

    I have plugin that allow user to write Custom CSS, and stored under my-plugin/themes/custom.css
    But whenever user update their plugin to newer version that customization would be replaced/deleted. how to keep that folder/files?
    I found that forcing user to save custom CSS under WordPress theme directory is not a good way, since user may change their WP theme.

    any solution for this? thank you.

  2. catacaustic
    very awesome
    Posted 2 years ago #

    Any folders that are under your plugins main root folder will be deledted when the update happens. That's just how it goes. The way that I've seen plugins get around this is by adding another folder in the /pluigns/ directory and storing files in there. That awy the custom files don't get deleted with the rest of the plugin when updates occur.

  3. takien
    Posted 2 years ago #

    great solution. thanks catacaustic :)

Topic Closed

This topic has been closed to new replies.

About this Topic