Skip to main content
Thoughts from David Cornelius

Category

Back in May, I lamented about my struggles to keep my Drupal websites updated. If I had command-line access to the web server, I could use its recommended method, Composer, and a cron job could magically keep everything updated for me--but I use inexpensive shared web hosting and that is not an option. This means I must manually upload a bunch of PHP files for each Drupal update. Version 7 wasn't that bad at only 12 MB and just over a 1,000 files but Drupal 8's footprint jumped up to 73 MB and over 18,000 files--and it increased further with Drupal 9 (I haven't checked the size of Drupal 10 which was released this month). The worst part is that all the files are date-stamped with the date the version came out so I can't simply upload only the new and changed files--they ALL look new! I'd just deal with it if it was an update to one or two sites every other month, but I maintain eight separate sites and there are often multiple security updates each month! Yes, I've reached my breaking point with maintaining Drupal sites on shared web hosting--it's time for something simpler, especially since most of my sites have infrequent changes and don't really need the power of a dynamic scripting language tied to an online database (it seems like I went from simple HTML in the 1990s to dynamic sites over the last 20 years and now am wanting to go back to simple HTML--what's old is new again!).

A comment on last May's blog opened my eyes to a different approach: use a static website generator. Since I'm a big fan of Delphi and know it's fully capable of generating web sites in a variety of ways, my first thought was to write my own. But a little bit of research revealed there are dozens (hundreds even?) of website generators, in nearly every programming language, and most are open source--so why reinvent the wheel? It would take far less time to study and put to use the efforts of those who have gone down this path already than it would for me to design and write one myself. Besides not EVERYTHING has to be done in Delphi!

As I read reviews and tried a few of them out, I kept coming back to the commenter's suggestion: Hugo. Whatever tool I was going to use had be well-supported, have lots of pre-built themes, good community support and documentation, and (hopefully) be able to import the content from my existing Drupal sites--Hugo is one of the few where I found direct support for converting Drupal sites. The more I looked at Hugo, the more I realized I would likely need to know the programming language Hugo is written in: Go.

So, I paused my research on website generators and took a deep look at Go, or Golang as some refer to it. Many of today's modern languages, especially ones used in conjunction with building or running websites, are scripted: PHP, JavaScript, and Ruby just to mention three popular ones.  Go, however, is compiled--that was one surprising and positive aspect that that struck me. It's also a relatively new language (less than 15 years old at this point), designed by the engineers at Google, has security and concurrency built in, is available on nearly every platform, forces clean and simple coding, is open source, and is well-supported with a growing user base and well-written documentation.

My goal for the new year is to learn this new programming language and jump whole-heartedly into working with Hugo to convert several of the Drupal sites I maintain. Uploading one or two changed HTML files when there's a content update and not worrying about constantly updating Drupal or fighting with PHP version incompatibilities will take significantly less time and worry! That sounds like a positive direction for 2023!

John (not verified) Tue, 01/03/2023 - 04:48

Hi David,

What hosting provider are you using? I use interserver and I have direct access to the terminal and can run commands. Plus, they are very affordable and with great customer support.

Things have changed dramatically in shared hosting. I would also expect the cpanel (or equivalent) in your current hosting to recognise the Drupal installations and offer to update them automatically when a new version arrives. 

david Tue, 01/03/2023 - 07:28

In reply to by John (not verified)

My sites are on ionBlade which has an option to install Drupal on a new site but I've installed it manually by uploading files and running the install.php script. Perhaps I should've used their installer but there's a lot about that process I don't know and wanted more direct control. If I upgraded to a more expensive tier, I'm sure shell access would be available

I used InterServer many years ago. I forget why I left but I'm in the middle of a 3-year contract with ionBlade and except for this one restriction (which I've also experienced with another web host), I'm happy with them.

There are other aspects of moving to Hugo I'm looking forward to: simpler content management of static sites, being free of server software dependencies, and an excuse to learn a new programming language. ;-)

Erwin Mouthaan (not verified) Thu, 01/12/2023 - 05:26

"Besides not EVERYTHING has to be done in Delphi!"

Almost everything. With RemObjects Gold you can mix Go with Oxygene within same project. Even third-party Go libraries can be used with Oxygene language. You still have an excuse.

https://www.remobjects.com/elements/gold/

Add new comment

The content of this field is kept private and will not be shown publicly.
CAPTCHA
Please enter the characters shown; no spaces but it is case-sensitive.
Image CAPTCHA
Enter the characters shown in the image.