All my content

How to update Drupal core and it's dependencies using composer

Submitted by gazza on Sat, 18/07/2020 - 13:59

Below is the command line code that you can copy and paste into your favorite command line terminal.

composer update drupal/* --with-dependencies

If you are using Plesk, you can access composer globally byusing the following command. Obviously change the php version to the one you are using.

/opt/plesk/php/7.4/bin/php /usr/lib64/plesk-9.0/composer.phar update drupal/* --with-dependencies

Drupal 8 to Drupal 9 migration

Submitted by gazza on Wed, 10/06/2020 - 07:39

I have now upgraded/migrated the trades persons business listings directory to Drupal 9. I have used very few contributed modules and actually achieved most of the functionality with Drupal core. The only contributed modules I used was to add functionality that is not essential but do add more usability options like users being able to login using Facebook and the Address, geolocation and geocoder modules which make it easier for users to add their business to the map.

Socket Overload Calculator

Submitted by gazza on Fri, 13/03/2020 - 09:42

How to add the Electrical Safety First Socket Overload Calculator to your website and keep it mobile friendly

The Electrical Safety First Socket Overload calculator is a fantastic tool and I would highly recommend adding it to your own website. You can display the socket calculator by going to the Electrical safety First webpage HERE to grab the embed code. There is just one catch!

Change PHP Version in Plesk using command line

Submitted by gazza on Thu, 13/02/2020 - 07:57

As a Drupal developer, I use composer which is a dependency manager for PHP.  A big part of developing Drupal 8 and above is to be able to use composer to install Drupal core, modules, themes and all dependencies without having to manually install everything individually. It is now recommended to install a Drupal module using composer to download it's dependencies. 

How to improve your business local ranking on Google

Submitted by gazza on Thu, 02/01/2020 - 11:02

I see all the time, either on Facebook groups, online forums and social media posts, people discussing their business listings in Google. I see many that give bad advice, some good advice and some that are completely wrong and likely get your business listing suspended.

Local search is not always about which business is more local. Here is a quote from Google:

My favorite theming modules for Drupal 8

Submitted by gazza on Thu, 23/05/2019 - 17:48

The field formatter class module is a fantastic contributed module for custom theming Drupal 8 fields. It allows you to add classes to the outer HTML wrapper for any field display, so that CSS and Javascript can target them.

I find this particularly useful to theme different content type nodes using the same field types.

How to change PHP CLI version for composer and plesk at the command line

Submitted by gazza on Thu, 23/05/2019 - 15:36

Below is the command line code for changing the default PHP version in Plesk. If you are using Plesk as I do on a number of VPS servers, even though you can change the php version inside the Plesk domain control panel, this does not change it at the command line.

I use Putty to connect to the command line. To connect your domain name in Plesk to the command line, you go to "Web hosting access" in the domain subscription type.

Here you will find the two important things.

1) A field with your "username" already filled in.

2) The IP address for the domain name