[wp-hackers] Proposal: standardize plugin-data path

Stephen Rider wp-hackers at striderweb.com
Thu Sep 25 21:58:18 GMT 2008

Hi --

There are a number of plugins that themselves have user-changeable  
files.  I'm not talking about ones where you edit the file to set  
options, but things like Spam Karma that have plugins of their own, or  
my own Pull-Quotes plugin that allows you to customize the style  
files, or caching and backup plugins that create files of their own.

We also now have an established auto-update system which, upon update,  
blows away anything in a plugin's folder, including any files that may  
have been added or changed.

I propose we establish an official location (changeable via CONSTANT  
of course) for plugins to put their custom data that should _not_ be  
so easily wiped out on update.  The default we set could be as simple  
as /wp-content/plugin-data.  Thus myplugin would use /wp-content/ 

I know plugin authors can just set that directory to anything they  
like, but I generally think it's a good idea to standardize such  
things.  Makes things a bit easier for plugin authors to establish an  
alternative location for things if there's a set standard.

What say ye all?


P.S. -- This came up in the course of wanting to allow users of the  
aforementioned pull-quotes plugin to set a custom directory for the  
pull-quote styles.  It would be great to have something like  
WP_CONTENT_DIR . '/plugin-data'

Stephen Rider

More information about the wp-hackers mailing list