Ubuntu 20.04 LTS – Now is the time

Reading Time: 3 minutes

Linux and Ubuntu, in particular, have been on the up and up these past few years. Today marks the release of Ubuntu 20.04 LTS, a major milestone in the releases for this massively favoured Linux distribution.

LTS?

LTS stands for Long Term Support in the release cycle world of software development. It marks a version that is usually safe to use and will be supported for a long time to come. You could almost equate it to a big release in the Windows (Service Packs/Red stone releases) or MacOS world (High Sierra/Mojave/Catalina etc.)

LTS releases come around every 2 years or so with the intention of a long supported development cycle that will ensure your software gets updates for the next 5 years (at least). You can read more about Ubuntu’s release history here.

Ubuntu 20.04 desktop

What’s New?

While there is a lot to go through, some of the highlights I found interesting include:

  • Desktop
  • Developer-centric improvements
    • Python3 is now the default (RIP Python 2)
    • PHP 7.4 support out the door
    • Ruby 2.7
    • Ruby on Rails 5.2.3
    • Apache, TLSv1.3, client cert auth
    • OpenSSH improvements
    • PostgreSQL 12
  • Network configuration / management improvements
  • Snap store
    • The Snap Store (snap-store) replaces ubuntu-software as the default tool for finding and installing packages and snaps.
  • Linux kernel 5.4
    • Boot speed improvements.
    • Significant power-saving improvements.
    • Numerous USB 3.2 and Type-C improvements.
    • Support for raspberry pi (Pi 2B, Pi 3B, Pi 3A+, Pi 3B+, CM3, CM3+, Pi 4B)
    • Includes support for new hardware including Intel Comet Lake CPUs and initial Tiger Lake platforms, Qualcomm Snapdragon 835 & 855 SoCs, AMD Navi 12 and 14 GPUs, Arcturus and Renoir APUs along with Navi 12 + Arcturus power features.
    • Support for AMD Rome CPUs, Radeon RX Vega M and Navi GPUs, Qualcomm Snapdragon 845 and other ARM SoCs and Intel Cannon Lake platforms.
    • Support has been added for the exFAT filesystem
    • Built-in support for the Wireguard VPN.
  • ZFS 0.8.3 file system
    • Big improvements to the already snappy ZFS file system such as hardware-accelerated Native Encryption and performance improvements.

I personally found the previous Ubuntu LTS release (18.04) to be quite solid and but this release looks to take things to the next level in exciting new ways.

Why Ubuntu? Why now?

Ubuntu is a well established, well recognized name in the Linux community. It’s well used, well documented and is extremely stable and easy to use without compromising on more advanced features one may require.

Ubuntu is perfect for the following groups of people; open-source developers and web developers, people looking to use a free, solid operating system alternative to Windows, elderly who pretty much just want to use the internet to browse, schools looking to teach students about real-world development challenges/computers, open-source enthusiasts, people who are donating older hardware and want a non-complicated operating system, business people and over the past few years, even gamers (Steam now has over 6000+ Linux games).

The beauty of Ubuntu is that it runs well on high-end hardware, but runs extremely well on older hardware, to the point where it can breathe new life into old machines. There is a reason developers love and enjoy Ubuntu, it’s fast, stable, to the point and extremely customizable to please even the most hardcore of developers.

Uses for Ubuntu

  • Use is as a Kodi/Plex media streaming server.
  • Give back by running a [email protected] server.
  • Use it as a web development server to build/test/run web applications or if you are looking to learn web development, Python development or server management.
  • As it’s super user-friendly, install it on your parents/grandparents machines and say goodbye to viruses/malware for the most part.
    • Software compatibility includes; Chrome, VLC, Skype, Spotify, GIMP, Inkscape, Dropbox, Steam, Visual Studio Code as well as a host of other software.
  • Hassle-free – perfect for education campuses, schools, learning centres or donated hardware looking for a free operating system.

Ubuntu installable image files can be downloaded from here.

My list of trusted WordPress plugins for 2020 and beyond

Reading Time: 8 minutes

Ask various developers what their preferred list of WordPress plugins is and you’ll get a varied and subjective list. The immense repository of WordPress plugins available to users is so overwhelmingly vast, it’s likely that nobodies two lists will look the same. With that being said, I’ve decided to write my list of trusted WordPress plugins for 2020 and beyond.

Before I continue, I should note that all of these plugins are 100% free, unless otherwise stated. I will be touching on some Premium plugins, but only a few as I want to make this list as accessible as possible.

AMP

AMP

Category: Mobile

Implementing AMP into a website has never been so easy thanks to the official plugin for WordPress.

The plugin can be configured to follow one of three different template modes: Standard, Transitional, and Reader.

In Standard mode, you use AMP as the framework for your site, and there need not be any separate AMP and non-AMP versions. When configured to operate in Reader and Transitional modes, a given page will have a canonical URL as well as a corresponding (paired) AMP URL.

The most important thing to understand about the plugin is that it’s not serving as a mobile theme; it does not redirect mobile devices to the AMP version. Instead, the AMP version is served to mobile visitors when they find the content on platforms such as Twitter, Pinterest, Google Search, and others.

[Link]


Block Bad Queries (BBQ)

BBQ

Category: Security. (Free & Pro version available)

BBQ is a great light-weight bad query blocker that protects your site against malicious URL requests. The plugin checks all incoming traffic and quietly blocks bad requests containing nasty server requests and excessively long request-strings.

The best part of it is that it’s a simple yet solid solution that requires no configuration. The free version is good for most blogs, but the Pro version comes with a lot more configurable features such as a customizable firewall and additional scanners.

Due to this plugin’s light-weight nature, I often prefer it when compared to its meaty alternative, Wordfence Security.

[Link]


Wordfence Security

Wordfence

Category: Security. (Free & Pro version available)

Probably one of if not the most popular WordPress security plugin out there, Wordfence sets out to secure your WordPress website in a number of ways and ultimately excels at it.

Wordfence includes an endpoint firewall, login security protection, traffic monitoring and malware scanner to name a few. The free version is a superb WAF (Web Application Firewall) and shelling out for the Pro version does come with additional benefits such as real-time firewall rules and advanced scanners.

The plugin has helped me out a couple of times for websites that have been both compromised and under attack.

If you looking for solid security for a WordPress website, I think very few could argue against Wordfence – it’s extremely good at what it does and coupled with the fact that it’s highly configurable, that’s definitely a plus for any WordPress website from a tiny blog to a full-fledged corporate website.

[Link]


Contact Form 7

Custom Form 7

Category: Forms

Contact Form 7 is not the best form plugin out there. However, it does one thing really well; simple no-frills forms for your website.

The popular plugin has some missing features one would come to expect from modern WordPress form plugins (see Gravity Forms below) such as saving submissions, conditional form fields and submission redirects – but those can either be remedied with additional plugins.

When I’m looking to add a super simple no-frills form to a website, Contact Form 7 (coupled with the next plugin I’m about to discuss) is my go-to. For more advanced form features, I usually look elsewhere like Gravity Forms.

[Link]


Flamingo

Flamingo

Category: Forms. (Requires Contact Form 7 to operate)

Flamingo is a straight-forward submission saving plugin for Contact Form 7.

Because Contact Form 7 doesn’t have a submission saving functionality, one usually has to rely on another plugin to extend its functionality and this is where Flamingo comes in.

Each time a Contact Form 7 form is filled out and submitted, Flamingo will log that submission. A nice little touch is that Flamingo can export all entries as a CSV file – handy for reports.

Flamingo goes hand-in-hand with Contact Form 7 and coupling the two together will bring much desired additional functionality to a rather simple plugin.

[Link]


Gravity Forms

Gravity Forms

Category: Forms. (Premium plugin only)

Gravity Forms is a modern form solution that goes over and above the basic functionality that something like Contact Form 7 and Flamingo provides.

Features like advanced fields, conditional logic, friendly interface, hooks, add-ons (upon add-ons) and an API makes Gravity Forms a much more extensible and developer-friendly solution to working with forms in WordPress.

I’d definitely opt for Gravity Forms over Contact Form 7 if I’m going to be implementing forms on a larger website or a website that requires forms to be more flexible.

[Link]


LiteSpeed Cache

LiteSpeed Cache

Category: Caching

WordPress has many well known caching plugins, but none of them quite come close to the speed and configuration that LiteSpeed Cache offers.

I personally find caching plugins such as W3 Total Cache, WP Rocket, Autoptimize and WP Super Cache to be hit or miss – more often miss than hit thanks to their fiddly nature, but LiteSpeed Cache for WordPress takes caching to a whole new level.

The way it presents itself and works with the user to optimize caching potential feels like a breath of fresh air in a sea of other caching plugins all trying to do the exact same thing.

LiteSpeed cache comparison

I found this plugin also offers more modern features over other caching plugins such as HTTP/2 & QUIC support, ESI (Edge Side Includes) support, Cloudflare and Memcached/LSMCD/Redis support.

If you’re looking for a solid and modern caching solution of WordPress, I’d definitely urge you to give LiteSpeed Cache a chance.

[Link]


Redirection

Redirection

Category: SEO

Broken website links are not only a headache for the user but adversely affect your SEO rankings.

Redirection is a great management tool that not only shows you broken URLs users are hitting on your website, but it allows you to put a redirect in place.

The plugin also features logging, conditional redirects, import & export functionality, 404 tracking and permission-based redirection.

In most cases, the usefulness of this plugin becomes apparent if change the slug of a long-standing WordPress post and need users quickly redirected to the new URL.

[Link]


SSL Insecure Content Fixer

SSL Insecure Content Fixer

Category: SEO & Security

While something like mixed content warnings can be resolved with a few well-placed rules to a .htaccess file, SSL Insecure Content Fixer makes it even easier and future proofs requests from trying to reach http:// over https:// ever again.

The plugin comes with 5 levels of fixing insecure requests, from simple to full. The plugin also makes provision for additional fixes for WooCommerce https:// issues.

There isn’t a whole lot more to this plugin, but it still goes on my list of trusted and necessary WordPress plugins for quickly dealing with mixed content warnings and ensuring https is locked into your website across the board.

[Link]


Yoast SEO

Yoast SEO

Category: SEO (Free & Premium version available)

What can be said about Yoast SEO that most people don’t already know about? Arguably the best SEO plugin for WordPress, it’s not hard to see why this is an essential and super popular choice for WordPress websites.

While the free version pretty much contains the features most will need, there is a Premium version of the plugin that offers even more options.

If you looking for a solid SEO plugin that ticks most of the boxes, Yoast SEO is undeniably it.

[Link]


Custom Post Type UI

Custom Post Type UI

Category: Extensibility

I’m personally not a fan of plugins that set out to do just one thing, especially if said thing can be done in code. However, I will always make an exception for CPT UI.

Custom Post Type UI provides a super easy to use interface for creating and managing custom post types and taxonomies on your website. When it comes to extending WordPress websites, ACF (see below) and CPT UI is usually my first stop.

Why this plugin is not part of WordPress core yet boggles me, but never has it been so easy to manage custom post types.

[Link]


ACF – Advanced Custom Fields

ACF

Category: Extensibility. (Free & Pro version available)

ACF is another amazing plugin that I believe WordPress should buy and incorporate into core. The amazing flexibility and potential it provides for a website make it a super popular and trusted option.

While the free version is fine, it’s the power of the Pro version where the plugin really shines brightly with it’s repeater fields, flexible content fields and clone field functionality.

If you’re building a website with slightly more complexity than your standard website, it’s likely you’re going to run in to the need for something that offers the features that ACF provides.

[Link]


UberMenu

UberMenu

Category: Menu (Premium Plugin)

Sure, the standard menu WordPress is fine when you’re operating within the realm of its limits, but if you looking to include larger, more complex menus then I have no doubt that you’re going to run into trouble.

UberMenu grants the ability to create some really unique, super complex menus that can contain some interesting features such as maps, contact forms, dynamic content, shortcodes and tabbed submenus.

I’ve used UberMenu many times in past projects and can vouch for its super ease of use and the huge amount of flexibility it gives a developer to really make those website menus pop.

[Link]


WP All Import

WP All Import

Category: Data (Premium Plugin)

If you’ve worked with data manipulation like getting batches of data out or into a WordPress website, you’ll know it can be a bit of a hassle. Thankfully WP All Import has come to my rescue a few times in the past.

WP All Import grants a developer to import data into to any theme or plugin field, update existing content with new data, import WooCommerce, ACF, users, listings and also includes automatic scheduling for those times when you want imports/exports to run on a timely manner.

The ability to also get exported data out of a plugin (and into Excel, XML or CSV) or the need to get CSV, RSS, JSON, XML, or Excel data sources into a plugin or custom post type quickly makes WP All Import a highly valuable tool well worth the price tag.

[Link]


I hope you enjoyed my list of trusted WordPress plugins for 2020 and beyond. Going forward, I’ll try keep this list updated by adding any other trusted plugins I use on a regular basis that I feel belong on here.

Laragon: The fastest way to setup WordPress locally

Reading Time: 2 minutes

Usually, when it comes to setting up a local dev environment you have a few options. I’m here today to share with you, the joy that is Laragon. The fastest way to set up WordPress (or any other PHP CMS really) on a local machine.

Depending on your operating system, most people would opt for a WAMP / LAMP or MAMP stack setup on their machine. Some prefer running a VM with their own web server they have set up.

Vagrant is a popular option which is essentially a Virtualbox VM in the background. Another popular option is WampServer or XAMPP, but these are quite specific to Windows (although XAMPP is cross-platform).

Recently I came across Laragon (Windows only), which is essentially XAMPP on steroids. Never before in my 15+ year career have I been able to set up a brand new WordPress (or Drupal) installation as quickly as Laragon can do it.

I was using Xampp for local development until about a year ago when I found Laragon & I haven’t looked back since. This is seriously the most powerful local development tool I have in my entire “developer toolkit”.

Laragon Forum user (Link)

You can go from having a freshly installed Windows operating system to having an entire WordPress installation in less than 30 seconds. In fact, I created a .gif to show you the magic in action. Behold;

Laragon comes with hosts file management so that means it will automatically create a neat local URL for you projectname.test – gone are the days of having to use http://localhost/projectname or http://127.0.0.1/projectname – Laragon handles this for you out the box.

There are quite a few additional benefits and features that come with Laragon;

  • 1-click PHP extensions enable/disable
  • Comes with phpMyAdmin and HeidiSQL (my preferred MySQL GUI manager)
  • HTTPS/SSL support
  • Ability to run NGINX alongside Apache
  • Extremely light-weight and blazingly fast (I can confirm)
  • Git / Redis / Memcached integration
  • Extendable – Laragon setup can be customized in nearly every way
  • Cmder integration out the box for shell access
  • Ability to install and switch between additional PHP versions
  • Symfony, Laravel and Drupal 8 1-click setups out the box
  • Additional support for Node.js/MongoDB, Python/Django/Flask/Postgres, Ruby, Java, Go once installed

Laragon comes in 3 flavours; Full (~130MB), Lite (~85 MB) and Portable (~18 MB) – I’d suggest the Full version to get you up and running fast, but that depends on your preference.

What Development Language or Framework Should I Learn in 2020?

Reading Time: 2 minutes

If you’re asking “What development language or framework should I learn in 2020?”, then this post is for you! I too was intrigued by this question and it got me wondering how I should go about figuring this out.

It dawned on me that the best way to figure this out, would be looking at what dev jobs are being asked for – not just locally, but internationally too.

My thinking is those job postings by language and country will surely give an indication as to what employers are looking for and what skills are in demand. And here are the results:

Global Top 3 Development Languages

Globally, here are the top 3 languages you should strongly consider learning in 2020: (no shortage of jobs with these skills)

  • Java
  • Python
  • React

(Note: C# came in 4th place)

South African Top 3 Languages

South Africa paints a slightly different landscape. Locally speaking, here are the top 3 languages you should strongly consider learning in 2020: (no shortage of jobs locally with these skills)

  • C#
  • PHP
  • Java

(Note: ASP.net came in 4th place)

Bottom 3 Development Languages

However, based on my findings, the 3 languages/skills with little to no jobs on offer:

  • Cordova
  • Haskell
  • Rust

(in other words, if you’re job hunting, I’d say it’s safe to give these a skip learning in 2020)

Global Top 3 Frameworks

Two front-end frameworks seem to come out on top here.

  • React
  • Angular
  • WordPress

(Note: Vue came in 4th place, with Laravel not too far behind it)

A closer look

Below you’ll find a city in a country with dev languages and frameworks ordered by the number of jobs. To gather this info, I used LinkedIn Jobs to search for keywords, left with the default option of “within 25km” of the city.

Just a note: The cities and dev languages I’ve selected are based on my own interests, but to be broad, I’ve included some languages and cities that don’t necessarily appeal to me but may provide insights to others.

I apologize if a dev language/city you were looking for isn’t listed below.

It should also be noted that these results are based on just one job website (of many) and some countries/cities may not use LinkedIn Jobs to it’s fullest potential.

Cape Town, South Africa

LanguageJobs
PHP4582
C#4545
Java4419
ASP.net2020
Python1943
Angular1745
WordPress1257
React1086
Node973
Laravel878
Ruby573
Django538
Drupal335
Ionic314
Cordova304
Vue302
Kotlin107
Haskell17
Rust9

Johannesburg, South Africa

LanguageJobs
C#4879
Java4633
PHP3246
ASP.net2237
Angular1425
Python1030
WordPress688
Node643
React606
Laravel604
Ruby250
Django219
Vue178
Drupal158
Cordova150
Ionic132
Kotlin63
Haskell25
Rust19

Durban, South Africa

LanguageJobs
C#659
PHP406
ASP.net293
Java223
Angular194
WordPress170
Laravel95
Node94
React83
Python82
Drupal48
Vue47
Ruby26
Ionic24
Django17
Cordova11
Kotlin6
Rust0
Haskell0

Dublin, Republic of Ireland

LanguageJobs
Java1648
Python1411
C#844
Angular646
React628
Ruby423
PHP325
ASP.net323
Node230
Vue140
Kotlin95
WordPress74
Django62
Laravel44
Rust15
Ionic11
Drupal10
Cordova9
Haskell8

London, United Kingdom

LanguageJobs
Python14753
Java10704
React7300
C#6212
Node3436
Angular3190
PHP2688
Ruby2501
ASP.net1609
WordPress1244
Vue1107
Kotlin991
Django876
Laravel372
Drupal351
Haskell176
Rust148
Ionic38
Cordova36

Brighton, United Kingdom

LanguageJobs
React410
Python345
Java314
Angular239
PHP223
ASP.net220
C#175
Node144
Vue107
Ruby106
WordPress88
Laravel78
Drupal33
Django21
Kotlin20
Haskell1
Cordova0
Ionic0
Rust0

Miami, Florida, United States of America

LanguageJobs
Java725
React674
Python663
C#391
Angular207
WordPress171
PHP155
Node144
Ruby94
ASP.net82
Kotlin39
Vue31
Drupal28
Django10
Cordova8
Laravel7
Ionic7
Rust5
Haskell0

New York, United States of America

LanguageJobs
Java10936
Python9695
React4391
C#2966
Node2391
Angular2314
Ruby2151
PHP1316
ASP.net1290
WordPress669
Vue574
Django474
Kotlin428
Drupal282
Laravel96
Rust82
Haskell66
Ionic49
Cordova41

San Francisco, United States of America

LanguageJobs
Python16645
Java12693
React5349
Ruby2989
Node2568
C#2422
Angular2255
PHP1314
Django752
Vue648
Kotlin610
WordPress477
ASP.net274
Rust211
Drupal205
Ionic87
Haskell85
Cordova75
Laravel40

Auckland, New Zealand

LanguageJobs
React173
Java156
Python137
C#114
Angular86
PHP71
Node45
Vue39
ASP.net28
Ruby28
WordPress23
Drupal18
Kotlin16
Laravel9
Ionic5
Rust2
Django1
Cordova0
Haskell0

Sydney, Australia

LanguageJobs
Java1329
Python1299
React696
C#
631
Angular460
Node371
PHP343
Ruby310
WordPress162
ASP.net154
Vue136
Kotlin96
Django66
Drupal54
Laravel33
Haskell19
Rust16
Ionic6
Cordova4

Mumbai, India

LanguageJobs
Java1773
Python1090
Angular778
PHP755
C#658
React590
Node543
ASP.net477
WordPress267
Ruby262
Django175
Laravel154
Vue117
Drupal85
Kotlin78
Ionic48
Cordova35
Rust5
Haskell4

Toronto, Canada

LanguageJobs
Java3190
Python2471
React2188
C#1701
Angular1644
Node1046
ASP.net682
Ruby624
Vue476
PHP364
WordPress217
Kotlin216
Django146
Ionic74
Drupal66
Rust62
Laravel45
Cordova41
Haskell4

São Paulo, Brazil

LanguageJobs
Java2121
Python1136
Angular907
C#849
React837
PHP829
Node531
ASP.net377
Ruby375
Vue218
WordPress199
Kotlin193
Laravel153
Django95
Ionic91
Drupal40
Cordova25
Haskell3
Rust2

Dubai, United Arab Emirates

LanguageJobs
Java40
Python33
C#26
PHP17
Node15
React14
ASP.net12
Angular9
Ruby9
Kotlin4
Vue3
WordPress2
Laravel2
Drupal2
Django1
Ionic1
Cordova1
Rust0
Haskell0

Disclaimer: The job results listed here were taken in early Dec 2019 and were correct at the time of publishing this post.

PHP in 2019 – PHP 7.3 is the new minimum. Here’s why.

Reading Time: 2 minutes

Web server admins. Content Management System users. Anyone who runs a WordPress, Joomla and Drupal website. Laravel users. All take note; it’s time to upgrade your version of PHP.

At the very core of most of the usable web, is PHP. An underlying scripting language that powers 79%80% of the web.

Because of its popularity and the sheer amount of websites running PHP, it has a common underlying issue; while new versions of PHP are released regularly, it’s not updated on web servers around the globe nearly as often as it should be.

This poses a serious security problem for both the website and users visiting the website.

You can blame lazy web server (or network) admins, or slacking service providers or even website owners who run older websites not ensuring that their old website ‘plays’ nicely with newer versions of PHP.

If you’re not too tech-savvy, you may be asking “So what? Why should I even care if my WordPress website is running an older version of PHP?” The short answer is two-fold; 1) Security (the most important no-brainer answer) and 2) “Progress”.

“Security, got ya, but why should I care about progress?” you ask. There is a myriad of fundamental reasons why both your website and your PHP version should be kept up to date.

Firstly, the web and more importantly web technologies move at an astounding pace. As the months go by, incremental improvements are made to the scripting language, massive security improvements are made and more tools, features and optimizations become available to developers.

Web developers heavily rely on a scripting language such as PHP to deliver the end product to a user be it a web application or website.

Secondly, because of this tectonic shift between the web server, PHP versions and the code running on your website (ie. a WordPress CMS) it’s common for a CMS to get updated while the PHP version is left behind; usually decaying to a point where it becomes almost critical to update.

This is usually where the problems begin to occur as certain components / plugins / features cease to stop working on newer versions of PHP. This can become a very expensive and time-consuming exercise to try to align older code with modern versions of PHP. It’s something that could have been totally avoided if PHP was just incrementally kept up to date on your web server.

As of 2019, a shocking amount of websites still run older versions of PHP, specifically PHP 5 which is now discontinued. As is PHP 7.0.

In fact, PHP 7.1 is on it’s way out too with PHP 7.2 reaching the end of it’s life span next year, around this time (no more security updates). Here is a handy chart to make sense of it all:

PHP supported versions
30 Nov 2020 is when PHP 7.2 stops receiving security updates. Source.

Going into 2020, one should be aiming for a minimum of PHP 7.3 (7.4 if possible) to avoid both headaches and heartbreak. If there is one thing I can ask you to take away from this; it’s the knowledge that not maintaining your PHP version can become a very costly lesson.

Drupal: 2019, the year of Twigging

Reading Time: 2 minutes

Drupal 8 Logo

Having worked with WordPress and Joomla over the years, one CMS always eluded me; Drupal. It wasn’t that I never wanted to work with Drupal, to be honest with you, the opportunity to learn while working with it just never happened.

I initially stumbled upon Drupal 6 many years ago – but I never fully explored it. I then dabbled in a bit of Drupal 7 many years later, but never to the extent of producing anything official or worth showing anyone. Thankfully this year my luck changed and I finally got around to extensively working with Drupal 8 on not just one, but two major projects.

Drupal is a free and open-source content management framework written in PHP. Drupal provides a back-end framework for at least 2.3% of all websites worldwide – ranging from personal blogs to corporate, political, and government sites.

Wikipedia

I’ll admit, going into Drupal my knowledge beyond the basics wasn’t very high. I found the learning curve a little rough initially, especially when I’ve been so accustomed to WordPress for so long.

Along the way, there were many curve balls that caught me off guard; from the way Drupal’s internals work to the way it expects the developer to work. An added level of complexity came from layering Docker on our build and also getting comfortable with Drush (a command line tool for Drupal), all while building a time-sensitive project that had to be delivered on time and on budget.

Over the past 10 months, working exclusively with Drupal 8 and successfully launching two large websites I’ve found a new respect for this CMS. As a CMS, what it sets out to achieve, it does fairly well albeit it still has some rough edges, but it’s nothing a little bit of work can’t resolve.

Along the way, I did encounter a few head-scratchily annoying issues (some settings can be fiddly), but nothing that was a deal breaker when it comes to learning more and using the CMS again in the future.

One small gripe I feel I must mention is how Drupal 8 uses Twig for theming. While it’s meant to be more ‘developer friendly’, I find it’s the opposite especially when one has to look up the Twig equivalent of commonly used PHP functions.

Twig is a template engine for the PHP programming language. Its syntax originates from Jinja and Django templates.

Wikpedia

Would I use Drupal to build a simple one page website? The answer is no. I’d still resort to using WordPress or at least straight-forward HTML. My feeling is that Drupal is a little over-engineered for that. But if you ask me to build a booking website or something that requires a bit of data capturing with web presentation on the front-end, I’d definitely be more open to using Drupal over WordPress.

With Drupal 9 on the horizon, the future for Drupal looks bright. I look forward to revisiting this CMS one day soon.

YouTube Channels For Learning Web Development

Reading Time: 2 minutes

YouTube

Thinking about teaching yourself web development? Perhaps out of interest, a potential career change or just our of curiosity? Well, the good news is that learning web development does not have to cost you a cent.

There are two key ingredients you will need and those are patience and practice. That’s it!

Where to start learning web dev?!

YouTube is a massive resource for free learning opportunities. There are many people out there, who are committed to sharing knowledge by creating good course content.

Even if you’re already a well-versed web developer, YouTube is a great resource to pick up a new skill set.

There are of course other ways to pick up learning web development for free, but for the purpose of this article, I want to focus on using YouTube as a free and accessible resource for new comers.

What do I need to start learning web dev?

Besides the two key ingredients I mentioned above; patience and practice, you will also need the following things to make your life a lot easier:

  • A Mac or computer with Windows / Linux (Ubuntu)
  • Access to the internet.
  • A good web browser like Chrome(Free) or Firefox (Free)
  • A good code editor like Visual Studio Code (Free) or Sublime (Free)

That’s it! Let’s move on to the free courses…

Learning To Code

The free courses at your fingertips


Codecourse | https://codecourse.com/

YouTube Channel:
https://www.youtube.com/channel/UCpOIUW62tnJTtpWFABxWZ8g

Some free courses on offer by Codecourse:


Coding Addict

YouTube Channel:
https://www.youtube.com/channel/UCMZFwxv5l-XtKi693qMJptA

Some free course on offer by Coding Addict:


Corey Schafer | http://coreyms.com/

YouTube Channel:
https://www.youtube.com/channel/UCCezIgC97PvUuR4_gbFUs5g

Some free course on offer by Cory Schafer:


CS Dojo | https://www.csdojo.io/

YouTube Channel:
https://www.youtube.com/channel/UCxX9wt5FWQUAAz4UrysqK9A

Some free courses on offer by CS Dojo:


freeCodeCamp.org | https://www.freecodecamp.org/

YouTube Channel:
https://www.youtube.com/channel/UC8butISFwT-Wl7EV0hUK0BQ

Some free courses on offer by freeCodeCamp.org:


LearnCode.academy

YouTube Channel:
https://www.youtube.com/channel/UCVTlvUkGslCV_h-nSAId8Sw

Some free courses on offer by LearnCode.academy:


LevelUpTuts | https://www.leveluptutorials.com/

YouTube Channel:
https://www.youtube.com/channel/UCyU5wkjgQYGRB0hIHMwm2Sg

Some free courses on offer by LevelUpTuts:


Traversy Media | https://www.traversymedia.com/

YouTube Channel:
https://www.youtube.com/channel/UC29ju8bIPH5as8OGnQzwJyA

Some free courses on offer by Traversy Media:


sentdex

YouTube Channel:
https://www.youtube.com/channel/UCfzlCWGWYyIQ0aLC5w48gBQ

Some free courses on offer by sentdex:


And that concludes my list of free YouTube resources on getting started with web development!

If you feel that I’ve missed some channels offering free web dev courses, please let me know in the comments below.

Switching to Cloud Hosting

Reading Time: 3 minutes

Background

Over the course of a long weekend, I attempted to move my standard shared hosting websites over to a cloud hosting solution.

Having multiple websites on shared servers, can get quite costly on a monthly basis and I wanted a solution that not only saved me some cash, but gave me some technical flexibility.

The Solution

I started investigating DigitalOcean which I’ve heard good things about before. They offer a cloud hosted VM solution called “Droplets“.

“More than just virtual machines. Droplets are a scalable compute platform with add-on storage, security, and monitoring capabilities to easily run production applications.”

– From DigitalOcean’s website

This sounded like a winning solution to me and off I went, signing up and spinning up a Droplet that runs the latest Ubuntu LTS release with a LAMP setup.

This was great because it allowed me to install the latest version of Apache, PHP and MySQL without being at the mercy of a service provider dictating versions to me (often found them to be behind the curve). I could run wild on my server install what I liked.

Weighing It Up

Pros of this approach:

  • Ability to run latest versions of LAMP packages.
  • Flexibility and freedom of managing your own server.
  • Better overview of what’s going on “under the hood”.
  • Cost effective with all your websites in one space, billed at a single cost per month.
  • All websites share the same server resources (this could a negative depending on how you look at it).
  • Potential to be way more secure.
  • Potentially snappier access for international users.

Cons of this approach:

  • Initially took a while to set up.
  • Security is all up to you and there is no one to blame if the system gets compromised.
  • Up to you to keep your server and packages up to date and not let the server decay over time.
  • Renewing SSL certs is up to you (but this can be automated).
  • Backups are all up to you (but there are DigitalOcean solutions to this).
  • Not locally hosted. Potentially slower access for local users, but this can be debated.

The Test

To test my new shiny server out, I had to start small. I tested my fiance’s website out first, a basic HTML5 website. After playing around with some DNS settings, I was able to get the domain pointing and working as intended.

The next task was to move my other, more complex sites over to the droplet. This included a Drupal 8 and WordPress website. The WordPress site worked like a charm, with no issues, but the Drupal site complained a bit about using a newer version of MySQL (MySQL 8) it wasn’t quite happy with. After a few tweaks here and there, I finally got it playing nicely with MySQL 8.

Amongst other new features and improvements, one big advantage MySQL 8 offers is improve performance; InnoDB is significantly better at Read/Write workloads, IO bound workloads, and high contention “hot spot” workloads. Read more about MySQL 8 here:
https://dev.mysql.com/doc/refman/8.0/en/mysql-nutshell.html

I updated both domains to point to my new server and after a bit of tweaking here and there to get HTTPS working correctly, I was finally up and running with both PHP sites working perfectly.

Next step was security hardening on both an Apache and server level. After following a few guides online and a bit of trial and error, I was successfully able to harden the server and get the firewall operating optimally. Final step was performance optimization, particularly on Apache and MySQL’s side to reduce memory usage and not be so frivolous with precious server resources.

Conclusion

Overall I was impressed with how well everything went. Not only was this my first real web server setup from scratch using this particular flavour of Linux, but it was my first attempt at cloud based VM management.

So far, I’m super impressed with DigitalOcean. It’s dashboard is superb and it’s one-click solutions of certain things is so snappy and efficient. It has great monitoring and alert tools to ensure my VM stays up 24/7 and the feeling of having all my websites in one place makes me feel warm and fuzzy inside.

If you’re interested in challenging yourself in learning something new, while potentially saving in hosting costs (if you host more than 3+ websites), definitely take the time to explore and investigate a DigitalOcean droplet.

WordPress REST API: Pull Through Posts From Another WordPress Site

Reading Time: 2 minutes

I recently needed to pull through 2 or 3 posts (they were recipes in this instance) from another WordPress website into the current WordPress project I was working on. It seemed tricky at first and then I remembered the WordPress Rest API!

As of version 4.7, the REST API is included out of the box and plugins are no longer required. The endpoints are accessible to anyone by appending /wp-json/wp/v2/posts to the end of the website’s URL (provided they are using WordPress 4.7 and higher)

Thankfully, with the help of a little snippet of code I wrote (see below), that was more than enough to get random posts pulling through from another WordPress website along with a like to that post and it’s featured image.

Update 09 July 2018: I’ve improved the code below. Simply throw the below into your functions.php file:

/**
 * Add this to your functions.php file
 * Using the REST API, retrieve posts from another website.
 * Retrieves images and renders the output below called via a [render_recipes] shortcode
 */
function get_recipes()
{
    // Enter The URL to the API here:
    $api_url = 'https://www.website-goes-here.com/wp-json/wp/v2';

    // Retrieve 100 items via the WordPress RestAPI - can be increased
    $response = wp_remote_get(add_query_arg(array(
        'per_page' => 100
    ), $api_url . '/recipes'));

    // Make sure the response is valid before we proceed...
    if (!is_wp_error($response) && $response['response']['code'] == 200) {
        $remote_posts = json_decode($response['body']); // Our posts are stored here

        uksort($remote_posts, function() { return rand() > rand(); }); // Shuffles the results around

        $remote_posts = array_slice($remote_posts, 0, 2); // Limits the array to 2 items for render

        // Loop through each item and render it
        foreach ($remote_posts as $remote_post) {
            echo '<div class="recipe-post col-md-6">
			    <a href="' . $remote_post->link . '" target="_blank" rel="noopener">';

            // Lets go get the corresponding media for each item looped, on the fly
            $medias = json_decode(file_get_contents($api_url . '/media/'. $remote_post->featured_media));

            // Render the image
            echo '<img class="nwc-recipe-img" src="' . $medias->source_url . '" alt="' . $remote_post->title->rendered . '">';

            // Render the title
            echo '<h5 class="nwc-recipe-title">'. $remote_post->title->rendered . '</h5>';

            echo '</a>
            </div>';
        }
    }
}

// Add the [render_recipes] shortcode
add_shortcode('render_recipes', 'get_recipes');

Then, you can call the function via a shortcode on your .php theme pages like so:

<?php
 // Add this to the .php page you need to call it on.
 do_shortcode('[render_recipes]');
?>

Quick break down of how the above function works:

  1. Retrieves the posts list in JSON format from the site’s WordPress Rest API
  2. If the response is a valid one, decode the posts and start looping through the results
  3. Retrieves 100 posts, shuffles it around and then sets a limit to 2 (all I needed in this example).
  4. Chuck the responses in a basic div element (div called recipe-post in this case, but also has a bootstrap class of col-md-6)
  5. While looping through each item, also get the media attached to that post. $remote_post->featured_media returns an id in this instance.
  6. We then spit out the $medias source_url (the full path to the full featured post image)
  7. Then spit out the title and close up the <div>

The above works fairly well in my instance I needed it for. Hopefully, the above snippet of code comes in handy for you too.

Some things to keep in mind using the above:

  • This may potentially slow down your site as it has to make a few more calls. (Set the per_page argument lower if it’s taking too long)
  • This will only work on websites using WordPress 4.7 and higher (relies on the REST API natively added in this version )
  • This also assumes the default endpoints are enabled and not blocked or closed up.