WordPress, SASS & Git on Godaddy. How I did it.
I decided the time had come to update the Skeleton Cru website to be on WordPress recently. There are a lot of benefits to moving to a CMS that align with the group’s growth goals, so it was time to roll up my sleeves and begin the process of getting the existing, static site changed over. I wanted to make a quick blog post about my process in doing that and my planning for ongoing workflow so that it may help some of you.
Get a Local wordpress running
Theme selection and modification
A big part of my standard process is to design and then find a theme that works well from a framework standpoint for my design. In this case, I already had a fully-responsive and static UI designed for the Skeleton Cru website and I needed to find a theme that would support that framework. I wound up going with a theme I found called Understrap which supported child themes (another criteria I had in mind for ease of future updates to the theme). The theme was installed and it was time to go to work.
using Sass and gulp on wordpress a theme
The Understrap theme supports SASS which is great, so that I can write less CSS and thanks to Gulp.js the SASS then gets nicely compiled into minified CSS for me on the go as I worked locally to build my design into WordPress. I chose the perfect time to move to WordPress because the content was starting to grow on the static site and if I’d waited much longer it would have been a real undertaking creating all the pages, posts, etc. required to make the changeover with the content.
hurdles & Crossroads
When I finished the WordPress theme modifications and addition of my old content into the CMS, I realized I had a problem. I could deploy the site to my host and the site would be great, but the next time I needed to make a change I wouldn’t have a way on the server to compile the new CSS from my SASS files. So, instead of looking for ways to run the compiler on the server, I looked for ways to set up a repository so I could make changes locally and push them to the server. The problem was that doing this on Godaddy’s shared hosting presented some unconventional challenges.
After doing a lot of research, trying some different approaches myself and even some calls to Godaddy, I found this article by Adam Boother. He laid out very clearly how to get into your Godaddy server via SSH (SSH has to be turned on in Godaddy’s settings) and how to install and initialize Git on your server. Once I had this up and running thanks to his blog post, I was able to successfully make changes locally, compile CSS from SASS files using Gulp.js and finally commit and push my changes to Godaddy.
ongoing workflow plan
Going forward, I’ll probably stick to this workflow. One potential hurdle I still have is the disparity between the local and remote database. The content will now be produced on the server by using the CMS and the local database will begin to slip behind. I definitely didn’t want to attempt to put my database under version control because any potential hangups with that could bring the site completely down. So, for now, I’ll download and replace my MySQL database on occasion until I have time to research a better solution. Still, this will save me a lot of manual work being able to push my changes automatically to Godaddy versus the alternative of manually uploading modified files from my local machine once they’re compiled.