Skip to content

Tyssen Design — Brisbane Tyssen Design logo

[email protected] (07) 3300 3303

Upgrading to ExpressionEngine 5

By /

It's only taken four and a bit years, but I finally got around to updating ExpressionEngine on this site. The site was running 2.11.9 and it's now on the latest version, 5.2.4. The main reason for the upgrade was because the way I had been dealing with images and code in blog posts wasn't ideal, it wasn't very flexible or user-friendly when creating content, and on the front end, the output wasn't responsive enough.

And funnily enough I deployed the newly-upgraded site just a few days after EllisLab launched the new version of the ExpressionEngine site. Great minds think alike 😉

The new ExpressionEngine home page

Fluid fieldtype

These days 'content' or 'page' builders are quite common features in different CMSs, giving you the ability to add sequential blocks of content where you can choose different content types for each block. That's what I wanted too, being able to mix images and code with text and have the CMS perform certain manipulations on the images and code without having to enter mark-up manually into a WYSIWYG editor.

With EE 2.x, there was no native way to achieve that. There were a couple of third party add-on options, Blocks and Content Elements, but neither are available anymore to download for EE2, so I was going to have to upgrade anyway. And by upgrading I'd be able to take advantage of EE's native Fluid fieldtype which does the same as the previously mentioned add-ons and more recent updates on the theme like Bloqs.

An example of the Fluid fieldtype used on a recent blog post

Hurdles (not many)

With such a long time between upgrades, I was expecting the process to be quite troublesome, but it was fairly straightforward. The site used to use Matrix and Playa but, as with the Fluid field, I decided to go with all native EE fieldtype replacements, Grid and Relationships. EllisLab provide the Playa & Matrix Importer for ExpressionEngine 2 and it works fine, creating duplicate fields while leaving your existing Matrix and Playa fields in place.

So the most time-consuming aspect of the upgrade was updating templates to use the new fieldtypes. But I also had a small issue with something trying to load Matrix even though I'd converted all the fields to Grid and then removed the fields and uninstalled the add-on. But if I removed the actual Matrix add-on folder, I'd get an error, even though I went through all the obvious places in the database and manually removed any table rows that were referencing Matrix. So for now, the Matrix folder is still in my add-ons folder, even though it's not being used.

I also spent a bit of time making some older plugins compatible with the new version of EE which in most cases just meant creating an addon.setup.php file, removing the $plugin_info array from the plugin file and adding the details to addon.setup.php instead.

There were quite a few add-ons too which just weren't needed anymore so I simply removed them, so overall add-on usage is much lighter.


return array(
  'name'        => 'Plugin Name',
  'version'     => '1.0',
  'author'      => '',
  'author_url'  => '',
  'description' => '',
  'namespace'   => '',
);
								
The bare basics of an addon.setup.php file

Performance

I had thought that upgrading to a more recent version of any CMS (assuming that everything else was pretty much the same as in my case) would naturally mean a site would get faster. But it didn't really work out that way. Admittedly, my testing very comprehensive, I just ran the site through wbench once before and after deploying the upgrade. And while the fastest times were tiny bit faster, the median times were a bit slower and the slowest times, a full second slower.


Testing https://www.tyssendesign.com.au/
At Thu Jun 27 18:47:49 2019
10 loops
                                   Fastest   Median    Slowest   Std Dev
---------------------------------------------------------------------------

Server performance:
Total application time                      Unable to be recorded

Host latency:
ajax.googleapis.com:443            35ms      37ms      62ms      8ms
cdn.jsdelivr.net:443               20ms      36ms      153ms     37ms
www.tyssendesign.com.au:443        202ms     206ms     270ms     19ms

Browser performance:
Navigation Start:                  0ms       0ms       0ms       0ms
Fetch Start:                       2ms       4ms       18ms      4ms
Domain Lookup End:                 20ms      24ms      41ms      5ms
Connect Start:                     20ms      24ms      41ms      5ms
Domain Lookup Start:               4ms       6ms       41ms      13ms
Secure Connection Start:           223ms     232ms     246ms     7ms
Request Start:                     465ms     481ms     501ms     10ms
Connect End:                       465ms     481ms     501ms     11ms
Response Start:                    1341ms    1504ms    1727ms    124ms
Response End:                      1346ms    1519ms    1731ms    122ms
DOM Loading:                       1347ms    1509ms    1734ms    123ms
DOM Interactive:                   1621ms    1818ms    2094ms    132ms
DOM Content Loaded Event End:      1791ms    1975ms    2173ms    126ms
DOM Content Loaded Event Start:    1791ms    1975ms    2173ms    126ms
Load Event Start:                  2110ms    2313ms    2422ms    113ms
DOM Complete:                      2110ms    2313ms    2422ms    113ms
Load Event End:                    2112ms    2314ms    2423ms    113ms
								
Before

Testing https://www.tyssendesign.com.au/
At Tue Jul  2 14:33:54 2019
10 loops
                                   Fastest   Median    Slowest   Std Dev
---------------------------------------------------------------------------

Server performance:
Total application time                      Unable to be recorded

Host latency:
cdn.jsdelivr.net:443               20ms      28ms      91ms      21ms
www.tyssendesign.com.au:443        180ms     185ms     188ms     2ms

Browser performance:
Navigation Start:                  0ms       0ms       0ms       0ms
Fetch Start:                       3ms       4ms       19ms      4ms
Domain Lookup End:                 23ms      33ms      46ms      7ms
Connect Start:                     23ms      33ms      46ms      7ms
Domain Lookup Start:               4ms       30ms      46ms      14ms
Secure Connection Start:           204ms     223ms     1011ms    238ms
Connect End:                       424ms     446ms     1324ms    264ms
Request Start:                     424ms     447ms     1326ms    264ms
Response Start:                    1512ms    1715ms    2774ms    347ms
Response End:                      1515ms    1717ms    2776ms    347ms
DOM Loading:                       1518ms    1721ms    2782ms    348ms
DOM Interactive:                   1767ms    2044ms    3142ms    352ms
DOM Content Loaded Event End:      2011ms    2209ms    3475ms    413ms
DOM Content Loaded Event Start:    2011ms    2209ms    3475ms    413ms
Load Event Start:                  2095ms    2403ms    3483ms    376ms
DOM Complete:                      2095ms    2403ms    3483ms    376ms
Load Event End:                    2097ms    2404ms    3484ms    376ms
								
After

Not really enough of a decline to be concerned about and it's quite likely that my sample size was too small for both before and after to draw any meaningful conclusions. Any improvement in site performance was only going to be a by-product anyway, with the main benefit being a site which is now easier to create content with, and to keep up to date, than it previously was.

So if anyone needs help upgrading ExpressionEngine to the latest version, let me know.

Like to say hello? Give us a call on (07) 3300 3303, send us an email to enquiries@tyssendesign.com.au, or a message by filling in the form below.