2015 in review: hand-written deploys, and my first PhpStorm licence

Very little front-end in my 2015. This was a year of servers: a PHP 5.6 migration across a platform, wildcard certificates so everything could finally go to HTTPS, a search server that needed reindexing every time someone breathed on it, and deploys that I described in a Word document and mailed to a hosting party the day before.
The deploy document
That is genuinely how it worked. For every release I wrote a numbered list of steps: which files, which order, which cache to clear, what to check afterwards. Someone else executed it during a scheduled window. If step 4 and step 5 were new, I wrote step 4 and 5 are new in bold at the top, because otherwise they were skipped.
It taught me something I would not have learned from a deploy button: a release is a procedure, and a procedure you cannot write down is a procedure you do not understand. I automate that list now. I still write it first.
Migrating a platform to PHP 5.6
The work itself is unglamorous and entirely about the long tail. What broke was never the application logic, it was the edges: a search integration that lost its configuration, a caching directory with the wrong owner after the upgrade, date handling in one report.
The pattern I settled on and still use: get an acceptance environment on the new version first, click through everything a real user touches, and only then schedule production. Every hour spent on acceptance is an hour not spent in a maintenance window with someone waiting.
Updating WordPress over SSH, without downtime
The WordPress sites I maintained were on hosting where the built-in updater simply refused:
Unable to locate WordPress Content directory
Or, my favourite:
Downloading update from https://downloads.wordpress.org/release/nl_NL/wordpress-4.4.zip… Unpacking the update… Could not create directory OR Could not copy file wp-mail.php Installation Failed
By then you have already tried every FTP constant in wp-config.php and none of them helped.
So: connect over SSH, adjust the path on line 1, paste. The update takes about five seconds, and the site shows a maintenance message for roughly one of them.
cd /YOURDOMAIN/PUBLICFOLDER/
mkdir customupgrade/
mkdir customupgrade/old/
wget https://nl.wordpress.org/wordpress-latest-nl_NL.tar.gz -P customupgrade/
tar xfz customupgrade/wordpress-latest-nl_NL.tar.gz -C customupgrade/
rm -rf customupgrade/wordpress/wp-content/
yes | mv index.php customupgrade/old/
echo "BRIEFLY UNAVAILABLE FOR MAINTENANCE." > index.php
yes | mv wp-includes customupgrade/old/
yes | mv wp-admin customupgrade/old/
yes | mv wp-blog-header.php wp-login.php wp-signup.php wp-activate.php wp-comments-post.php wp-links-opml.php wp-mail.php wp-trackback.php wp-cron.php wp-load.php wp-settings.php xmlrpc.php customupgrade/old/
yes | mv customupgrade/wordpress/* .
mv customupgrade/old/ oldwordpressbackup/
rm -Rf customupgrade/
Then log in at /wp-admin and let it upgrade the database. What it does, step by step: park the
old core files in a backup folder, drop a maintenance message in index.php, move the new core in
(which overwrites index.php and so ends maintenance mode), and keep wp-content untouched the
whole time. If anything fails, the old install is sitting in oldwordpressbackup.
Afterwards, fix the permissions you just disturbed:
chown apache:apache -R *
find . -type d -exec chmod 755 {} \;
find . -type f -exec chmod 644 {} \;
Buying an IDE
On 21 December I bought my first PhpStorm licence. Four years after leaving Dreamweaver for a plain code editor, I paid for a program that has opinions again, and the difference is that these opinions are about code rather than about markup.
Three things justified the price, none of which a text editor can do:
It understands the code, not the characters. Rename a method and every call site follows. Jump to a definition inside a framework you did not write. Find every usage of something before you delete it. A text editor can search for a string; this knows the difference between a string and a symbol.
Step debugging. Set a breakpoint, look at the actual variables at that line, walk back up the
stack. The first time you do that you realise how many years you spent adding a var_dump and
refreshing the page.
It knows the database and the templates. Autocomplete on a column name catches a typo before the page loads rather than after the client finds it.
The honest trade is weight. It is slow to start, it wants to index everything, and it does things in the background I did not ask for. For a quick edit over SSH I still reach for something smaller. For a codebase I am going to live in for years, it pays for itself in the first week.
Buying it also settled something. Between 2005 and 2011 I bought a lot of software, and most of it was replaced by things the browser now does for free. This is the one purchase from that habit that I have renewed every December since.
Icons were a font that year
A small thing that dates 2015 precisely: every project I shipped had an icon set in four files. .eot for old IE, .woff for everything current, .ttf as fallback, and
.svg for old WebKit. One icon set, four formats, because no single font format worked
everywhere.
The technique was to map glyphs to private-use characters and place them with a class:
.icon-search:before {
font-family: 'icons';
content: "\f002";
}
It was a real improvement over sprite sheets: one HTTP request, scalable, recolourable with
color. It was also nonsense, and you could see it the moment a font failed to load and your
navigation filled up with squares, or a screen reader read your icon out as a private-use
codepoint.
I did not question it at the time. Everyone shipped icon fonts in 2015.
The first interns
Also 2015: the first time I supervised students rather than just doing the work. It changes what you notice. Every step I could not explain out loud turned out to be a step I did not understand, and most of them were the "just do it like this" habits I had never questioned.
Half of what I now write down as project documentation exists because somebody once asked me why, and I did not have an answer.
In short
Servers, a PHP migration, and deploys written by hand as numbered documents. Bought my first PhpStorm licence, shipped icon fonts in four formats, and supervised my first interns.