markjaquith / feedback

Ask @markjaquith anything!
42 stars 4 forks source link

WordPress-Skeleton: Purpose of the 'shared' folder symlink #40

Closed timrourke closed 9 years ago

timrourke commented 9 years ago

Mark,

Total newb, so forgive me if this question is absurd, but why is it important to create a symlink from the '../content' folder to '../shared/content/uploads'? Isn't this redundant, since you've already gone to the trouble of abstracting the '/content' folder out of the main WordPress install?

Is it simply a matter of further removing rich media files like images/binaries from the WordPress core to avoid committing that data to the repo, or is their something else important going on here?

That said, is the best way to use your project to manually create my own '/shared/content/uploads/whatever' folders for items I'll be uploading to a WordPress project, or will the WordPress media uploader create the relevant directory structure for me upon upload?

Thanks!

timrourke commented 9 years ago

By the way, in your Q&A section, you mention using a deploy script, and an NFS folder. I assume you mean a 'network shared folder'? Any advice on where a newb can get started on deploy scripts for WordPress projects, and what sort of NFS do you prefer?

Thanks again. Sorry for all the questions. I greatly appreciate your input!

markjaquith commented 9 years ago

It’s so that non-repo files live outside of the code directory, so they aren't wiped away on deploy. Consider something like Capistrano, which creates a new "release" directory for each deploy. If the uploads lived in an individual release directory, they'd get blown away on each deploy.

I do the double symlink so there is a single non-deploy directory. Easier for local .gitignore, and easier on the server because it’s just one symlink that Capistrano needs to create for the deploy.