nathanjosiah
nathanjosiah

Reputation: 4459

Creating a file from a wordpress plugin

I am creating a wordpress plugin that needs to be able save a file. What is the best way to do this without worrying about file permissions. (i.e Is there a directory that is considered safe to write to?)

Upvotes: 0

Views: 152

Answers (2)

ori
ori

Reputation: 7847

If you can upload images to your blog, then wp-content/uploads should be writable.

But file permissions are always something to worry a little about when you're deploying to a new server.

Upvotes: 1

Kristian
Kristian

Reputation: 3461

Normally you can create a directory with mkdir(), mermissions to chmod(777) so you can delete this directory from ftp without a root user and this dir will bee fully writable via php. And also chmod you files with 777, otherwise you can't delete without root permissions.

Upvotes: 0

Related Questions