I've been writing articles about understanding Drupal's concepts, rules, and features for site building, but things haven't come together the way I'd hoped and I've hit a bit of a wall — so I'm taking a break to round up the current state of the site.
Introduction.
Here's a rundown of recent updates to the site.
- Drupal Core update
- Module additions and updates
- The English pages for the multilingual site are coming together.
- Testing the built-in site search feature included with Drupal Core.
Since November 20th, Drupal Core update notifications have been coming in rapid succession, and I've been applying each one as it arrives. The updates cover security patches and bug fixes. Module updates have been coming around the same time as the Drupal Core updates, so those get applied as well. I'm also configuring Google Search Console and Google Analytics to keep an eye on site traffic.
The English site I mentioned building in the previous article using Drupal's multilingual feature is now mostly complete. The result is a single site with both Japanese and English content coexisting.
I'd figured site search wasn't necessary just yet with so few articles, but I went ahead and added it as a test. Using the search feature that comes standard with Drupal Core.
1. Drupal Core Up Date.
Update notifications were coming one after another with barely any gap, so I applied each one as it arrived.
- 10.3.10 - 22 November 2024 // 10.3 patch (bug fix) Updated 11/22
- 10.3.9 - 20 November 2024 // 10.x series security release Updated 11/20
- 10.3.8 - 12 November 2024 // 10.3 patch (bug fix) Updated 11/12
- 10.3.7 - 7 November 2024 // 10.3 patch (bug fix) Previous update
Updated Drupal Core from 10.3.7 to 10.3.10.
1-1.Composer Up Date.
The update is done with Composer, same as before, following the Bitnami manual.
- Enable maintenance mode for the update
- Back up .htaccess, settings.php, and robots.txt
- Change the working directory to the Drupal application
- Upgrade the application with Composer and Drush
- Update the database and clear the cache
- Confirm the application updated successfully
- Restore the file backups
- Disable maintenance mode once the update is complete
Buckup.
Back up .htaccess, settings.php, and robots.txt.
$ cp /opt/bitnami/drupal/.htaccess /home/bitnami/.htaccess.backup
$ cp /opt/bitnami/drupal/sites/default/settings.php /home/bitnami/settings.php.backup
$ cp /opt/bitnami/drupal/robots.txt /home/bitnami/robots.txt.backupChange directory.
Change the working directory to the Drupal application.
$ cd /opt/bitnami/drupal/Drupal Update.
Run the following command to upgrade the application with Composer and Drush.
$ drush cache:rebuild
[success] Cache rebuild complete.
$ sudo composer update "drupal/core-*" --with-all-dependenciesUpdate started
Do not run Composer as root/super user! See https://getcomposer.org/root for details
Continue as root/super user [yes]? yes
Loading composer repositories with package information
Updating dependencies
Lock file operations: 0 installs, 26 updates, 0 removals
- Upgrading drupal/core (10.3.9 => 10.3.10)
- Upgrading drupal/core-composer-scaffold (10.3.9 => 10.3.10)~ 中略 ~
Generating autoload files
Hardening vendor directory with .htaccess and web.config files.
45 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
Cleaning installed packages.
No security vulnerability advisories found.
$Update complete
DB Update.
Database update and cache clear
$ drush updatedb
[success] No pending updates.
$ drush cache:rebuild
[success] Cache rebuild complete.Check for updates.
Confirm the application updated successfully
$ drush core:status
Drupal version : 10.3.10
Site URI : http://default
DB driver : mysql
DB hostname : 127.0.0.1
~ 中略
Drupal root : /opt/bitnami/drupal
Site path : sites/default
Files, Public : sites/default/files
Files, Temp : /tmpDrupal version confirmed at 10.3.10.
Reconstruction.
Restore the .htaccess and robots.txt file backups.
$ cp /home/bitnami/.htaccess.backup /opt/bitnami/drupal/.htaccess
$ cp /home/bitnami/robots.txt.backup /opt/bitnami/drupal/robots.txtDrupal Core has been updated from 10.3.7 to 10.3.10.
Since launching Drupal on Lightsail, Drupal Core has been updated from 10.3.3 through to 10.3.10.
2. Module Up Date.
- Captcha (2.0.6 => 2.0.7)
- Easy breadcrumb (2.0.8 => 2.0.9)
Update notifications also came in for the modules I'm using, so those get updated too. Modules can normally be updated from the Admin console, but in my environment a permissions error prevents that — so I use Composer instead.
The Composer command for module updates is:
$ composer update drupal/(module-name) --with-all-dependencies
2-1. Captcha Up Date.
Updating Captcha, the module used for Google reCaptcha.
Captch update.
Update started
$ sudo composer update drupal/captcha --with-all-dependencies
-----
Do not run Composer as root/super user! See https://getcomposer.org/root for details
Continue as root/super user [yes]? yes
Loading composer repositories with package information
Updating dependencies
Lock file operations: 0 installs, 1 update, 0 removals
- Upgrading drupal/captcha (2.0.6 => 2.0.7)
Writing lock file
Installing dependencies from lock file (including require-dev)
Package operations: 0 installs, 1 update, 0 removals
- Downloading drupal/captcha (2.0.7)
- Upgrading drupal/captcha (2.0.6 => 2.0.7): Extracting archive
Generating autoload files
Hardening vendor directory with .htaccess and web.config files.
45 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
Cleaning installed packages.
No security vulnerability advisories found.
-----Update complete
Database update and cache clear
$ drush updatedb
[success] No pending updates.
$ drush cache:rebuild
[success] Cache rebuild complete.Confirming the update
$ drush pm:list
--------------------- ---------------------------------- ---------- ----------
Package Name Status Version
--------------------- ---------------------------------- ---------- ----------
Core Actions UI (action) Disabled 10.3.10
Core Announcements Enabled 10.3.10
~~~ 中略 ~~~
Spam control CAPTCHA (captcha) Enabled 2.0.7
Spam control Image CAPTCHA Enabled 2.0.7
(image_captcha)Captcha update from 2.0.6 to 2.0.7 is complete.
2-2. Easy breadcrumb Up Date.
Updating Easy Breadcrumb, the module used for breadcrumbs.
Easy Breadcrumb Update
Update started
$ sudo composer update drupal/easy_breadcrumb --with-all-dependencies
-----
Do not run Composer as root/super user! See https://getcomposer.org/root for details
Continue as root/super user [yes]? yes
Loading composer repositories with package information
Updating dependencies
Lock file operations: 0 installs, 10 updates, 0 removals
- Upgrading drupal/easy_breadcrumb (2.0.8 => 2.0.9)
- Upgrading symfony/dependency-injection (v6.4.15 => v6.4.16)
~~~~~ 中略 ~~~~~
Writing lock file
Installing dependencies from lock file (including require-dev)
Package operations: 0 installs, 10 updates, 0 removals
- Downloading symfony/deprecation-contracts (v3.5.1)
~~~~~ 中略 ~~~~~
- Downloading symfony/dependency-injection (v6.4.16)
- Downloading drupal/easy_breadcrumb (2.0.9)
- Upgrading symfony/deprecation-contracts (v3.5.0 => v3.5.1): Extracting archive
~~~~~ 中略 ~~~~~
- Upgrading drupal/easy_breadcrumb (2.0.8 => 2.0.9): Extracting archive
Cleaning: symfony/validator
Cleaning: symfony/routing
Cleaning: symfony/http-foundation
Cleaning: symfony/http-kernel
Cleaning: symfony/dependency-injection
Generating autoload files
Hardening vendor directory with .htaccess and web.config files.
45 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
Cleaning installed packages.
No security vulnerability advisories found.
-----Update complete
Database update and cache clear
$ drush updatedb
[success] No pending updates.
$ drush cache:rebuild
[success] Cache rebuild complete.Confirming the update
$ drush pm:list
--------------------- ---------------------------------- ---------- ----------
Package Name Status Version
--------------------- ---------------------------------- ---------- ----------
Core Actions UI (action) Disabled 10.3.10
Core Announcements Enabled 10.3.10
~~~ 中略 ~~~
Navigation Easy Breadcrumb Enabled 2.0.9
(easy_breadcrumb)Easy Breadcrumb update from 2.0.8 to 2.0.9 is complete.
3. Adding modules.
Installing two modules to set up Google Search Console and Google Analytics. Both are services for analyzing site traffic.
Google Search Console analyzes traffic from Google Search. The main data it provides includes search keyword rankings, impressions, and clicks, along with user attributes like language, region, and device type.
Google Search works by registering individual pages in what's called Google's index — only indexed pages appear in search results. Google crawls websites around the world using bots; when a site is published, a Googlebot visits it, runs a standard review, and if the site passes, the site and its pages are added to Google's index.
Informing Googlebot of the site structure in advance helps Google understand the layout, improving review efficiency and speeding up indexing. To tell Google about your page structure, you need to place an XML file on the site — this is called a sitemap.
Google Search Console setup involves:
- The verification ID for Google Search Console (google-site-verification= followed by 43 characters) is placed in the DNS TXT record.
- The XML sitemap used to inform Google of the site structure is handled by the Simple XML Sitemap module.
Google Search Console is limited to analyzing Google Search traffic, but Google Analytics covers all visitors to the site — including repeat visits — regardless of source. It analyzes traffic origin by region, language, search vs. other, and tracks user behavior on the site through page views, sessions, and more.
Google Analytics setup involves:
- The Google Analytics measurement ID (beginning with G-) is added to the site using the Google Tag module.
The modules being installed this time are:
- Simple XML Sitemap Version 4.2.2 as of November 2024
- Google Tag Version 2.0.6 as of November 2024
Setting up Google Search Console and Google Analytics involves configuration on Google's side too, which would make this article quite long — I'm planning to cover the full setup in a separate article.
The Composer command for installing a new module is:
$ composer require 'drupal/(module-name):^(version)'
3-1. Adding Simple XML Sitemap.
Installing the Simple XML Sitemap module, which handles the XML sitemap used to inform Google of the site structure.
Install Simple XML Sitemap.
Installation started
$ sudo composer require 'drupal/simple_sitemap:^4.2'
-----
Do not run Composer as root/super user! See https://getcomposer.org/root for details
Continue as root/super user [yes]? yes
Loading composer repositories with package information
Updating dependencies
Lock file operations: 1 installs, 0 update, 0 removals
- Locking drupal/simple_sitemap (4.2.2)
~~~ Terminal log not saved — installation log unavailable ~~~
Generating autoload files
Hardening vendor directory with .htaccess and web.config files.
45 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
Cleaning installed packages.
No security vulnerability advisories found.
-----Installation complete
Database update and cache clear
$ drush updatedb
[success] No pending updates.
$ drush cache:rebuild
[success] Cache rebuild complete.Confirming the module was added
$ drush pm:list
--------------------- ---------------------------------- ---------- ----------
Package Name Status Version
--------------------- ---------------------------------- ---------- ----------
Core Actions UI (action) Disabled 10.3.10
Core Announcements Enabled 10.3.10
~~~ 中略 ~~~
SEO Simple XML Sitemap (Search Disabled 4.2.2
engines)
(simple_sitemap_engines)
SEO Simple XML Sitemap (Views) Disabled 4.2.2
(simple_sitemap_views)
SEO Simple XML Sitemap Enabled 4.2.2
(simple_sitemap)Simple XML Sitemap (4.2.2) installation is complete.
3-2. Adding Google Tag.
Installing the Google Tag module, which adds the Google Analytics measurement ID (beginning with G-) to the site.
Install Google Tag.
Installation started
$ sudo composer require 'drupal/google_tag:^2.0'
-----
Do not run Composer as root/super user! See https://getcomposer.org/root for details
Continue as root/super user [yes]? yes
Loading composer repositories with package information
Updating dependencies
Lock file operations: 1 installs, 0 update, 0 removals
- Locking drupal/google_tag (2.0.6)
~~~ Terminal log not saved — installation log unavailable ~~~
Generating autoload files
Hardening vendor directory with .htaccess and web.config files.
45 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
Cleaning installed packages.
No security vulnerability advisories found.
-----Installation complete
Database update and cache clear
$ drush updatedb
[success] No pending updates.
$ drush cache:rebuild
[success] Cache rebuild complete.Confirming the module was added
$ drush pm:list
--------------------- ---------------------------------- ---------- ----------
Package Name Status Version
--------------------- ---------------------------------- ---------- ----------
Core Actions UI (action) Disabled 10.3.10
Core Announcements Enabled 10.3.10
~~~ 中略 ~~~
Other Google Tag (google_tag) Enabled 2.0.6Google Tag (2.0.6) installation is complete.
4. Creating an English website.
The English page build I wrote about in the previous #C17 Short break article is now mostly complete.
Previous article
I decided to try Drupal's built-in multilingual feature and have been creating an English version of the Japanese site.
Drupal's multilingual feature doesn't automatically translate Japanese pages — it translates menus and fixed fields that you designate. Articles need to be translated separately, so I use DeepL to translate them, then create them as separate English articles with the language setting specified as English.
The key point is that pages with a language setting get a language directory added to the URL after the domain.
On my site this looks like:
- Japanese: https://inter-est01.com/ja/article01
- English: https://inter-est01.com/en/article01
All pages set to English are collected under /en. This means Block Layout can assign English menus and sidebars specifically to those pages, and contact form fields display in English — effectively Englishifying that side of the site.
I'm working through translating the Drupal and Lifestyle articles I've written and organizing the English taxonomy terms. The actual workflow will be covered in a separate article.
Still in progress, but you can see the English side of the site by selecting Engish from the Language menu at the top.
Drupal's translation feature is limited to the default fields and descriptions provided for content types, blocks, and so on — articles I've written and block menus I've created are not translated automatically, so I've prepared separate English versions for each.
What was prepared separately for the English pages
- For articles: create a separate content type with the language set to English, and write articles translated into English.
- Category list pages and related/recent article blocks created with Views: all prepared separately with the language set to English.
- Vocabularies and terms created in Taxonomy: all set to English and prepared separately.
- Menu and footer blocks: all set to English, content translated, and links pointing to English pages — prepared separately.
- Contact form: added English to the default Japanese language setting and translated it → confirmed that input field labels and the submit button switch by language → handled on the same page with both Japanese and English text, no separate page created.
- The primary domain inter-est01.com defaults to Japanese, so like the contact form, it includes both Japanese and English text on the same page.
- Created separate Japanese and English Top pages to replace the single top page previously set on the primary domain, and set each as the Home link for its respective language.
- The breadcrumb Home links to the primary domain — but inter-est01.com/en, which is linked from the /en alias, doesn't resolve via the alias and shows the node number instead, so I handled this by changing the display name in Easy Breadcrumb's page settings.
- Configured translation for the site search covered in the next section, and confirmed that input field labels and the search button switch by language — same as the contact form. Since I'm using the default Search, results currently show both Japanese and English articles. I'm still working out how to limit results to the selected language.
Having used Drupal's multilingual feature to create Japanese and English pages, I'm happy with how it functions and how usable it is. The concept is straightforward: selected languages get aliased and grouped, so once you understand the /ja and /en basics, grasping what Drupal translates automatically versus what you need to translate yourself makes building a multilingual site relatively manageable.
The administrative side is another story, though — the number of articles and menu items simply doubles, and the Admin console ends up with a mix of translated and untranslated content in different languages, which gets messy to manage.
My site doesn't use the default menu so this isn't an issue for me, but if you do use it, the title menu's Home link is fixed to the primary domain — which can't be changed via translation — so clicking Home from an English page takes you to the Japanese version.
- inter-est01.com : Primary domain / Japanese
- inter-est01.com/ja : Displays the primary domain page / Japanese
- inter-est01.com/en : Displays the primary domain page — Japanese
- The default for /ja and /en is the primary domain, but since these are reserved aliases in the system, the link destination cannot be changed.
My workaround is to include both Japanese and English content on the primary domain page. I also considered user-agent or referrer-based redirects, but those aren't really recommended, so this approach is what I'm going with.
When I built a bilingual WordPress site before, I used subdomains with separate WordPress installs — managing them entirely independently. Thinking about flexibility, I wonder if that approach might be better for Drupal too. Whether I actually do it is a separate question, but that's where my thinking has landed after trying Drupal's built-in multilingual feature.
The main Japanese site.
The Japanese site. Since Japanese is set as Drupal's default language, this is what displays by default.
The English site currently being built.
The English site. With English selected as the language in Drupal, translated articles and menus set to English combine to make it an English site.
5. Add search function.
Added site search. The site is still new with few articles and thin content, so I wasn't sure it was necessary yet — but I wanted to try the default Search feature in practice, so it's now available in trial form.
The setup is simple — search covers three categories: content, help, and users. You can configure the minimum character count for search accuracy, alias settings, and ranking conditions.
Search results are rendered with list tags, but this layout can't be changed from the Admin console — you need to modify the template file. I don't have a good grasp of Twig or preprocess functions yet, so that's something I'll need to study.
Another option is the Search API module. Search API brings Views capabilities to search, which means you can freely design the results layout and set up multiple search functions with different filtering conditions.
There are a few options available, so I want to clarify what I need from search before deciding how to build it out.
Conclude.
This article was meant as a change of pace, but once I started writing it turned out to be more work than expected... Going forward I want to write more concrete, practical articles about using Drupal — using this site's own setup as the subject matter.
Setting up the local environment
After launching the site, I hadn't touched the Drupal install on my MacBook for a while — time to revisit it. A backlog of updates had piled up, so I'm clearing those out too.