• Resolved takien

    (@takien)


    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.

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

    (@catacaustic)

    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.

    Thread Starter takien

    (@takien)

    great solution. thanks catacaustic ??

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How to prevent folder under my plugin from being deleted/replace while update?’ is closed to new replies.