## filters – Do Not Back Up? Is there any accepted way to tell backup and clone plugins to skip a certain file?

Question

I’m developing a plugin that creates a temporary file containing ephemeral data. By default the file goes in wp-content/ but there’s a config variable that lets site operators put it anywhere they want.

(This is a cache plugin, and the file is the cache file.)

It’s pointless to back up this file, and we definitely don’t want to save and restore it when cloning or migrating a site.

Is there a commonly accepted filter my plugin can hook to tell those plugins to skip this file? Or is there another way to do this that works for at least some of the backup / restore plugins out there in the wild?

I know Back WP Up skips directories containing a .donotbackup file. Is this a universal thing?

0
2 months 2023-01-31T17:24:56-05:00 0 Answers 0 views 0