Placing static files in the webroot

First, I searched for an answer but may have missed an obvious topic. If this topic exists, please point me there! I dislike rehashing on new topics as much as the next person.

I need to have two small static files in the webroot. I know how to get them into the proper folder on staging/production but want to assure that any future re-provisions include those same files. I assume that there is a folder in the project files where I can place these two files and know that they will be provisioned or deployed to other environments?

For the record, there is a specific plugin for this functionality that we need. But what starts as a simple 12 lines of javascript becomes a massive plugin with the attendant maintenance and security issues. It just seems easier and more compact to inject the javascript with Google Tag Manager (already installed and in use) and to put the two needed text files in the webroot. And those two files have absolutely no consequence to the security of the site and are fine exposed to public scrutiny.

Let me know what I missed or if there is a better way of accomplishing this task. I assume there has to be something as putting static html files in the webroot for google webmaster console or other ssl security auth purposes is common.

1 Like

2 Likes

So I assume that any files I place in that folder on the local dev environment will deploy out to staging and/or production? I did see that but there was no real mention of what happens to non-project files if placed in that folder.

Thanks for the pointer!

1 Like

Bedrock isn’t really going to have any concept of “project files.” As long as the files are tracked in your repo they’re part of the project. You didn’t mention what you’re using to deploy, but if you’re using Trellis then they’ll get deployed.

Yes to Trellis. My go to WP kit these days is Trellis/Bedrock. Thanks for the quick answers.