I purchased the domain, and it was auto-magically configured for me. First thing I did was download a copy of my live site. The idea here was: if I simply edit the website itself my life will be easy.
So my working directory looked like this:
D:/Portfolio/Website/cppcooper.com
D:/Portfolio/Website/template
Now, I still didn’t really have any idea what I was doing. So I found a tutorial on converting a bootstrap template to wordpress. I skipped the first part of the tutorial. I decided I’d be better off jumping into some code. So I figured out that I needed to add a new directory to installation-root/wp-content/theme/
and then add a handful of files and also drag over a bunch of the template assets (png/css/js). Following that tutorial I quickly figured out how to break apart an html page into a sections (ie. header.php;footer.php;index.php;functions.php)
Getting Started
Now that I understood that the primary goal, for converting a regular template to a WordPress theme, was to break up the template into reusable bits of code. I needed ways to work, and more than that I needed a way to test my work. The tutorials I came across all pointed to MAMP or WAMP as a basic starting place. I didn’t want that on my system though, I just can’t trust server software on my workstation; regardless of whether the server is local or not I want it sandboxed more than that because I have trust issues. So I started looking into software to use for WordPress development.
All The Software:
- FileZilla
- Putty
- Virtual Box
- Ubuntu Server
FreeBSDDreamweaver CC- SublimeText 3 + plugins (SFTP!SublimeZilla!Linter~mumbo~jumbo!)
- WordPress
- Google Chrome
- Google Chrome’s DOM
I spent a couple days getting the VBox server setup. I downloaded both Ubuntu Server 14.04(?) & FreeBSD un.known. I also downloaded Unity that same night for an employer pre-hire test, but I won’t get into that. I was initially going to install FreeBSD, and had only downloaded Ubuntu Server because I knew it would be easy and, probably, quite small. I ended up only installing Ubuntu because the .iso file was 500MB vs 2.6GB. I didn’t want to go through the installation process, inside a virtual machine no less, for the latter 2.6GB. So I installed Ubuntu and set it up with a Host-Only network interface. That interface blew up after ~15 minutes. So I spent probably 2 hours trying to ascertain the cause of the problem, and ended up fixing it by reinstalling Virtual Box. Tahnx Oracle! Roughly two hours I will never get back from trying to fix an adapter that looked good on both ends.. *sigh*
After that fiasco, I spent half a day configuring the server. That meant binding some directories to my user’s home directory, saving settings in Putty and FileZilla, reinstalling word press a few times, and creating and dropping databases. At one point my windows work directory looked like this:
D:/Portfolio/webdir/
/cppcooper.com/
/ubuntu/
/ubuntu/cppcooper.com/
/ubuntu/wp-Substance/ - [junction]
/wp-Substance/ - [junction]
/assets/ - [junction]
That isn’t even the extent of the junctions. I had asset junctions in 4 different directories at one point. The local-server’s side of the equation was not so bad, it just had everything in the windows /ubuntu/ directory. I had learned how to edit /etc/fstab to make directory bindings from /var/www/html/ into my user’s home directory.
Trying to Work
I followed a simple tutorial for converting a single page bootstrap page to a word press theme. So by the end of that I had footer.php, header.php, index.php, and functions.php. Still thinking WordPress development was going to be more designing a webpage than coding and making reusable code, I dug out Dreamweaver again and spent a day realizing it is aweful for WordPress theme development. Mainly it was how slow it was for viewing changes.
Heh, so you can probably imagine the time I had based on some of the above. The root of my troubles, were ironically, in my work directory’s structure. Those troubles reached everywhere from manually synchronizing files with FileZilla, to editing files, and even what I thought was “breaking” WordPress installations. Originally this was going to be from then to now tale of creating my work flow, and all the troubles therein. Half way into writing I began to realize I couldn’t structure the post, in an hour and a half, to be that kind of post. So that is it. In my next post I’ll cover what my current workflow is, why it makes more sense, and maybe a bit about why it is much faster. (MUCH FASTER)