Skip to main content

General ssh update script for Drupal

First transfer the drupal-8.8.x.tar.gz file to your directory

Via your ssh program (for us Terminal on OSX), enter the path to the directory where you transferred the drupal-8.8.x file

Drupal update 8.7.x to 8.8.0

While the Drupal site has a great outline of the steps to follow, I found we needed to tweak so the update would work for us.  I found the update process from 8.7.10 to 8.8.0 that worked on our sites was as follows

composer php version

Updating Drupal from 8.7.10 to 8.8.x or 8.9.x has seen a significant change as it has now moved into 9.x.  It has integrated more with composer, and you can be caught by fatal errors occurring during the update process.  One of these errors for me was the php version.  

Terminal commands - find

Find by file name

To perform a find command in terminal use

find / -name php.ini -type f

find / -name {filename} {type parameters}

Note there are many parameters in the commands, so I'll cover a couple regular expressions here.  Such as, 

vi(m) command mode

In Vim, following is an outline of the vi(m) functions you can utilise whilst in command mode - yes they are case sensitive

composer memory_limit

A recent attempt to run an update composer (regular activity for many of us), I had a memory limit issue.  This was surprising because the memory setting via Plesk is set to 2G.  Yet through Terminal it was showing only 128MB.  What gives??  

The error I was seeing:

get IP address from terminal OSX

When troubleshooting network issues or configuring devices, knowing your IP address can be essential. Whether you're connected via Wi-Fi, Ethernet, or tethering through a mobile provider, macOS offers powerful built-in tools to quickly identify your IP address. Here's a practical guide tailored to Australian users with step-by-step instructions.

 

date formatter

Working on formatting the date in Xcode, and you come across the situation where you need to check or test the date format.  NSDateFormatter is a great site to check your date format string.  I wanted to transform the 2019-08-15 10:34:49+1000 to Aug 15, 12:34 AM.

Number decimal places

Adding a floating decimal point for n number of places is quite easy to achieve.  The key to understand is the receive an outcome of a fraction the numbers need to be Double.  So Int numbers will result in a whole number product.  By way of example:

  • 80 / 3 = 26

We know that this result is incorrect.  To get the correct outcome the equation needs to be as follows:

Subscribe to