Category: Drupal
How to create pseudo fields in Drupal using 2 hooks
What are pseudo fields? In Drupal, pseudo fields are fields that do not store data in the database, but rather dynamically generate content on the fly. Pseudo fields allow site builders and developers to add custom content to entities (such as nodes, users, and taxonomy terms) without needing to create a separate field for it.…
What are the benefits of PHP 8.1 and the Commands to upgrade from an older version on Nginx?
PHP 8.1 is the latest version of the popular server-side scripting language, and it brings a host of new features and improvements that make it a compelling choice for developers. In this article, we’ll highlight some of the key benefits of upgrading to PHP 8.1.
Drupal 10, a quick overview
Drupal 10 is the latest version of the popular open-source content management system (CMS) Drupal, released on December 14th, 2022. It marks the culmination of over two years of development and brings with it numerous new features and improvements. One of the key features of Drupal 10 is its support for modern web development practices.…
How to step debug PHP code with Xdebug and PhpStorm on a DDEV setup
What is debugging? Per wikipedia: “In computer programming and software development, debugging is the process of finding and resolving bugs (defects or problems that prevent correct operation) within computer programs, software, or systems.” Per Internet: “Debugging is like being the detective in a crime movie where you are also the murderer.” – Filipe Fortes What…
How to redirect from www to non-www URL using Cloudflare for free
After doing a quick SEO audit to this website, I found that https://davidloor.com/ and https://www.davidloor.com/ were both up. Since search engines see them as two different websites, it may arises issues because of duplicated content. So, I needed to pick one of the domains and redirect the other to the one selected. On the internet…
Drupal 8+ media module does not create the default bundles (Media Types) after installation
When the media module that is part of the the Drupal 8+ core is installed, we expect that the default media entity types, [Document, Image, Audio file (local), Video file (local), Remote video ] get created automatically, so they are available when creating a new media field. But, that is the case when we are…
The most used drush commands in Drupal 8+
drush status drush cex –destination=path/to/export-config drush cim drush updb drush generate drush sql-dump –gzip –result-file=./sites/default/files/YOUR-FILE-NAME.sql Export a database compressed as gzip
How to check quickly if your website is protected against DoS attacks?
The objective of this quick how-to is to explain how to perform a stress test against your site and see how it behaves under extreme load. The Open Source tool that we are using for this test is the HTTP benchmarking tool wrk.
How to setup a WordPress or Drupal site locally with ddev
DDEV is an open source tool that allows setting up local sites using docker, quickly. You will learn from my experience with it about how to use it, and some helpful commands.
How to uninstall the contrib module multiversion on Drupal 8.7 or later
If you are planning an upgrade from Drupal 8 to Drupal 9, I strongly recommend that you uninstall the contrib module multiversion before you update the core to the latest 9.x version. Some of the contrib modules that require the multiversion module are: Deploy, Workspace, Replication. These modules will be automatically uninstalled as part of…