How to create a private folder for a PHP snippet to create XML files in?

[ad_1]

Hello,

I wrote a PHP snippet which can generate a XML file everytime a certain webhook happens, and currently it’s creating the file in a folder under /public-html. I then move it out of that folder every 15 minutes using FTP ([make.com](https://make.com)) into a secure SFTP folder.

I’d like to upgrade it so that it’s SFTP for both, and that I’m not temporarily storing the file under a publicly accessible folder on my WordPress hosting, because the file contains customer info.

​

* Can I set up a private folder that the PHP snippet has permission to write too? And that [make.com]) would be able to read from using a secure connection?
* If it’s not possible, what other methods could I use to not expose customer info?
* What’s the best way to do this? (I’m with Siteground)

[ad_2]

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer