I'm developing a plugin. Where is the best place to store a user uploaded file that is sensitive in nature? It should not be web accessible. Given the encoding of the file, it's necessary that it be uploaded, as opposed to storing it in the database.

  • What do you intend to do with the file? – Jacob Peattie Mar 1 '19 at 0:50
  • It's a tls certificate. It will be passed as part of the header when making curl requests. (--cacert [file]) – Scratcha Mar 1 '19 at 0:54

Upload files at anywhere ( normally create your own folder inside wp-content/uploads folder ), you can create .htaccess file and index.html files inside the folder to restrict the files from direct access.

Keep index.html blank and add deny from all text in .htaccess file.

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.