I have a folder inside my plugin that's used to store cached data for the application.

There's no need for the user to edit these files so I'd like to remove this folder's files from appearing in the "Plugin files" listing that appears in the right sidebar when editing the plugin files via "Plugins > Editor".

Is this possible?

  • As far as i'm aware there's no way to exclude files from the plugin editor, there's only support for disabling it, but no way to selectively exclude files/folders or specific plugins. – Mark Duncan Aug 17 '11 at 21:01

Use the upload directory to store files.

You should never store files in the plugin directory. There is no guarantee that you have write access there.

  • 1
    Good call. Just to add a detail for the OP: you can easily determine which is the uploads dir using wp_upload_dir(). – MathSmath Aug 17 '11 at 22:58
  • As an additional point of interest on this topic, some server configurations are vulnerable to code injection if the attacker figures out how to put custom code into your cache file. – Annika Backstrom Aug 18 '11 at 3:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.