Articles

A collection of articles and snippets I've collected over the years.


How to upgrade Magento 2 to a later version

June 9, 2017

Here's how to upgrade Magento 2 to a later version. For example, if you are currently running 2.1.6 and you need to upgrade to 2.1.7.

How to get the URL of a CMS page or a static block in Magento

April 19, 2017

Here's how to get the URL of a CMS page or a static block in Magento.

How to use a different SSH port with rsync

April 18, 2017

I'm forever forgetting how to use a different ssh port with rsync, so here's how to do it.

HEAD request with PHP

March 30, 2017

If you want to perform a HEAD request with PHP on an URL you can use the `stream` functionality...

Cheat Sheet: Magento Collection Snippets

August 18, 2016

A cheat sheet containing useful Magento Collection snippets.

Magento Snippet: Use a Group By clause on a collection model

August 17, 2016

Here's a Magento snippet showing how to use a Group By clause on a Magento collection model.

Managing Homebrew Services

August 5, 2016

Homebrew is easy to use and makes installing services such as MySQL or Elasticsearch a breeze. Here's how to manage those services.

Iā€™m a Magento Certified Developer!

August 4, 2016

I'm pleased to announce that I have recently passed the Magento Certified Developer exam.

Fix for PHP Composer ā€œ????%ā€ issue

July 28, 2016

I've had a problem on a few older projects where composer dies with "????%" after running `composer update`. Here's the fix.

Introducing Hit The Ground: Laravel Edition

July 26, 2016

I had the idea a while ago of creating a basic starter app containing the boilerplate code needed to get started on an idea - so here it is. Introducing my Laravel Starter App - Hit the Ground.

Magento Custom Variables

July 12, 2016

Magento provides an interface for you to define your own custom variables. You can use these in CMS pages, static blocks, email templates and phtml templates. Here's how to use them.

MySQL Foreign Key Tutorial

July 9, 2016

Here's a quick tutorial on creating foreign keys with MySQL.

Testing Magento Email with Mailtrap.io

May 26, 2016

Have you discovered how hard it is when testing Magento email? Have you ever tried getting Magento to use a separate SMTP server to send emails? I have, and got very frustrated with it. My solution...

How to backup and restore with Magento 2

March 1, 2016

Magento 2 comes with built-in functionality to backup and restore the code, media, and database. You can choose to backup and restore code, media, or database separately. Here's how to backup and...

Product and Breadcrumb Rich Snippets in Magento

February 29, 2016

Here's how to add products and breadcrumb Rich Snippets in Magento.

Magento Snippet: How to set and get cookies in Magento

February 22, 2016

Here's how to get and set cookies in Magento.