So I just followed along step-by-step with @swalkinshaw in the Composer screencast and set up a new local install. I thought I got everything down, but in the end, the content directory (what Scott names ‘app’ in the video) isn’t working properly. When I load the site, it’s not finding any of the theme css files and when I’m logged into the WP dashboard in wp-admin/themes the screenshots of the themes don’t display.
Here’s what I entered into Terminal (bash) according to Scott’s lead.
When I drop the Roots theme into my content/themes directory, it shows up in the wp-admin/themes dashboard. So clearly, something is working.
I’ve gone back and reviewed the screencast a second time and can’t figure out where I might have gone off the rails… Any thoughts on what could be going wrong? Where to look?
Thanks @Foxaii and @swalkinsha for the replies. Still a bit stuck here.
I disabled rewrites in Roots, but that didn’t have any effect. And actually none of the themes are working. By that I mean that the images are missing and there’s no CSS.
Not sure what to do next. Would welcome any additional advice …
Usually when I’m running into an issue like this, Chrome’s inspector and console are helpful. Find out what the error is, then find a CSS or img file in the inspector, and edit the src to see if you can get it fixed. That should give you a better idea of what the error is and how to fix it
In most cases files should be 644 (rw- r-- r–) and folders should be 755 (rwx r-x r-x). Try loading up the stylesheet or one of the images to see if you get a 403 error.
Thanks @kalenjohnson and @Foxaii. With your help, I was able to get to the bottom of it (I think!).
Problem wasn’t with permissions or rewrites, but instead with where I was pointing my virtual host to. I had it set to the subdirectory where I had WordPress installed (usr/name/sites/localdev.dev/wp/) which meant that none of the stuff in the content directory which was in the root directory (usr/name/sites/localdev.dev) was reachable. (Forgive my rather untechnical description.)
When I went into the Settings > General in the wp-admin, I noticed that both
WordPress Address (URL) and the Site Address (URL) were set to http://localdev.dev
That was the clue I needed. I reset the localhost location to the root directory, updated the WordPress (URL) in Settings > General and shazam! That fixed it.
Hope this is helpful to someone in the future. Thanks to everyone who chimed in and helped me with this. As someone with limited experience in the command line, I’m feeling pretty amped to have gotten git and composer working. Hooray!
Ah I see, I think that was covered in the screencast but it was probably easy to miss.
Modifying your workflow is always difficult at first, because you have to learn something new or do things different than how you’re used to doing it. But you’re on the right track, all these types of things, Composer, Grunt, Vagrant, etc. are going to help immensely with both speed and quality of your work… once you get settled in