I took on a simple wordpress website. Well yes the site is very simple, almost no custom development but, it is wordpress and I am trying to do things with best practices. So it hasn’t been easy.
- Getting a virtual environment working has been a headache.
I settled on Scotchbox because it had a lot of tools but didn’t require to many strange dependencies like ruby plugins when my site is only php behind nginx or apache.
- I wanted to have a git repo for the environment to do code on multiple computers or to be able to hand off the project to someone else if I ever needed too.
I wanted to have a git repo for the theme to be able to have releases and features.
This is the most difficult part.
Create the theme as its own git repository.
It can be a single file to start, this only to get the module setup going.
Create the top level of your project (ie the contents of a wordpress install). Use the GIST to ignore basically everything but the vagrant file, your gitmodule file and the path to the theme you are developing.
/website-server VagrantFile .gitignore (see gist file below) .gitmodules .git /public_html /wp-content /themes /website-theme-01 .gitignore .git
Follow these direction using the path to your theme in the themes folder.
Once that is setup, you will be able to commit any vagrant file changes to your wordpress-site-vagrant repo and any changes to your theme can be committed to your website-theme-01 repo.
Now developing themes is a harmony and is easy to replicate across projects and is easy to share a project to multiple developers.