How to Create a Directory in a Plugin Folder?

Do not use the plugin directory to store new files.

  • During an update the plugin directory will be erased by WordPress. And all files in it too.
  • The plugin directory might be read-only in some setups (I do that always).

Use the regular uploads directory for that.

And 0777 is never a good idea. Write access for everyone is probably not what your users want.

Leave a Comment