Saving to a File from a Website: What is Needed?

I have a personal project that I would like to start building sometime this year. In essence, I want to build a website to take user-submitted content (exclusively text) and use it to build a story, which is accessible for viewing from that same site. While I have no idea how long these stories will become, or how much interaction the site will ultimately receive, I can imagine that the amount of memory required could become very large very quickly. As such, I would like to save all content of each story, both that from the user and that from the site, to a text file. The goal would be to have the story’s content easily accessible, both by me and by the site, but also to ensure that site isn’t bogged down by strings and strings of text and takes unbearably long to load.

My question is this: what do I need to learn to be able to build this kind of interaction? I have completed the Responsive Web Design Certification course on this site, and am currently in the middle of the “Intermediate Algorithm Scripting” section of JavaScript Algorithms and Data Structures Certification course, so my studies cover HTML, CSS, and Javascript. I plan to continue studying the courses on this site, and I have also been asked to study PHP. I bring this up because I assume that between jQuery, MySQL, and PHP, at least one of these can get the job done, but I’m obviously unsure which one is best.

I’m not currently in any rush to get this project started; I’m just curious which one would be best whenever I do start. If I had to sum up the question in one sentence it would be this: what language/system is best for building interactions between front end development and external files, especially for saving and accessing content?

Thank you very much!