• I’m writing a plugin and would like to be able to have the plugin create a new directory in the wp-content/uploads folder much like WordPress does when an image is uploaded for a post. In my case I want my plugin to tell WordPress to create the folder only once during the activation of the plugin (with of course a check to see if the folder already exists). I’ve tried to find information on this but can’t find if there’s a built in function for this, or if I have to code up my own php function to do it (I’d prefer using a built in function of course).

    Is there one?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Check in the line 1055 area of wp-includes/functions.php for the wp_mkdir_p function. Of course I don’t quite see how it works… ??

    Thread Starter harknell

    (@harknell)

    Thanks for the pointer. I’ll look into how it works and probably hook into it somehow.

    If anyone else knows anything else that might help though, that’s appreciated too ??

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Is there a WordPress function I can use to create a folder on the server?’ is closed to new replies.