whoami
Lucas Jenß
cat /etc/motd
The Coding Journal ツ — Notes taken on an epic coding journey. Technical solutions, debugging notes, and practical guides from the trenches of software development.
ls -la ~/languages/
- drwxr-xr-x
- ▶ PHP
- ▶ Ruby
- ▶ Scala
- ▶ C#
- ▶ JavaScript
- ▶ Objective-C
- ▶ Shell Scripting
ls -la ~/toolchain/
- drwxr-xr-x
- ▶ Typo3
- ▶ Akka
- ▶ Capistrano
- ▶ Git
- ▶ MAMP
- ▶ Adobe Illustrator
- ▶ NSTrackingArea (Cocoa)
uname -a
- drwxr-xr-x
- ▶ Mac OS X
- ▶ Unix
TYPO3 multisite setup with shared database tables
A TYPO3 multisite installation with shared database tables lets several websites run from one TYPO3 codebase and one database connection. That suits Australian organisations that want consistent releases, reusable assets, and a platform team supporting more than one domain. It also creates a clear engineering question: which data is genuinely shared, and which records must remain attached to a single site?
The setup below assumes TYPO3 12 or 13, Composer, MySQL or MariaDB, and separate root pages for each domain. It uses TYPO3’s native site configuration rather than separate installations or a third-party domain bundle. Shared storage is treated as a deployment decision, not as an automatic promise that every page or content element is visible everywhere.
Plan the shared data boundary
Decide what “shared” means before creating a second YAML file. With one TYPO3 installation and one connection, both sites use the same physical schema and prefix. Records such as sys_file, sys_file_metadata, sys_category and selected sys_language entries can be consulted by both sites. The table definition is shared; ownership and visibility still follow TYPO3’s page and record rules.
Pages, tt_content and most extension records stay attached to a pid under a site root. Put each site’s editorial content below its own root, then reuse selected assets or categories by reference. Do not copy the same database rows into both trees: duplicated UIDs, translations and relations quickly drift. If a shared landing page is required, use a deliberate page-reference or extension mechanism rather than assuming the database layer joins trees.
Australian operational details belong in this plan. Sydney and Melbourne are common hosting regions, but pick the one nearest the audience and measure Perth or Adelaide separately. .com.au registration can require an Australian presence or an eligible business identifier, so keep registrar access with an authorised account manager. If the sites handle personal information, review the Australian Privacy Principles and applicable state or territory requirements before copying production data into a development environment. The engineering context at CCJ Engineering is a useful reference when agreeing on ownership and escalation.
Create the roots and site configuration
Install TYPO3 once, then add the site roots through the backend. For a fresh local checkout, Composer and PHP’s development server are enough to begin:
composer create-project typo3/cms-base-distribution .
php -S 127.0.0.1:8080 -t public
After the installer completes, create a normal page for each website and enable its “Website root” flag. Record the numeric UID of each root; those values become the anchors for the site configuration. Keep the roots separate even when both domains use the same database. The examples below use placeholder IDs 101 and 202. In Australian team shorthand, call the roots “shop” and “editorial” rather than “site one” and “site two”, so a casual handover does not become a data-ownership guessing game.
Create one directory per site beneath config/sites and give each a stable identifier. The base URL must match the hostname visitors reach, while each language base remains relative to that site.
# config/sites/sydney/config.yaml
rootPageId: 101
base: 'https://example.com.au/'
languages:
- title: English
enabled: true
languageId: 0
base: '/'
# config/sites/brisbane/config.yaml
rootPageId: 202
base: 'https://brisbane.example.com.au/'
languages:
- title: English
enabled: true
languageId: 0
base: '/'
Keep language identifiers consistent with the relevant sys_language record and use 0 only for the default English locale configured in the installation. If English means different things on two domains, create separate language records and site-specific overlays instead of silently sharing one translation. Apply the same TYPO3 version, extensions and table prefix across both sites; otherwise “shared” quickly becomes two subtly different systems.
Connect domains and Australian infrastructure
Create DNS records for every hostname and terminate TLS with Caddy, nginx or a managed load balancer. Forward the original Host and X-Forwarded-Proto headers, then configure TYPO3’s trusted proxy settings so HTTPS is detected correctly. Test both www and bare-domain requests because many Australian users try either form before reaching a cached search result.
Set application time handling to Australia/Sydney or the relevant state time zone while storing logs in UTC. Account for daylight saving in deployment windows and alerts, and let the backend display the local date. If files or backups stay in Australia, document that choice; if they leave the country, confirm the provider region and the organisation’s data-handling policy before enabling public uploads.
Treat shared files as a separate resource from shared tables. TYPO3’s file abstraction can let both sites resolve the same FAL storage identifier, but keep writable uploads outside an immutable release directory and preserve file metadata when restoring. Test an uploaded image, its metadata and a reference from each root on a staging copy; a successful database query alone does not prove the filesystem path works.
Verify the boundary and compare schemas
Validate each route at every language base, confirm canonical URLs and check that one site never resolves to the other site’s root. Inspect pages and content records by PID, then verify a known sys_file UID is referenced from both trees if sharing is intentional. Also test login, forms, search and scheduled tasks because each depends on a different part of TYPO3’s request and cron handling.
Common failures include duplicated rootPageId values, mismatched language IDs, a DNS record pointing at the wrong virtual host, and one deployment using a prefix that differs from the other. Database prefixes are installation-wide in standard TYPO3, so there is no safe per-site prefix switch inside one code base. Correct configuration before treating a schema problem as a content issue.
Automation should check effects, not just successful commands. The same principle behind actor message flow tests is useful here: issue a request and confirm that the expected database, cache or filesystem state changed. Keep those smoke tests in CI and run them against a restored staging database before production.
The practical difference between shared and isolated schemas becomes clear when their operational effects are set side by side.
| Area | One shared schema | Separate schemas |
|---|---|---|
| Installation | One TYPO3 instance and release | Two instances or releases |
| Records | Common rows and references; page trees still differ | Independent rows, translations and relations |
| Files | One FAL catalogue and storage | Separate catalogues or an explicit sync process |
| Schema change | One migration affects every site | Migration and rollback can be staged separately |
| Recovery | Database and file restore covers all sites | Failure domains remain separate |
| Best fit | Closely related brands or campaign sites | Strict isolation, ownership or regulatory boundaries |
Roll out safely and keep both sites healthy
Before a shared schema rollout, take a database snapshot and back up the FAL storage. Put the relevant front ends into maintenance mode, deploy code and configuration together, then run vendor/bin/typo3 database:updateschema, vendor/bin/typo3 extension:setup and the cache commands. Because one schema update affects every site, test all domains on staging before changing the live database.
Turn the sequence into a repeatable deployment runbook that records backups, migration output, cache warm-up results and smoke-test evidence. Keep a maintenance window in AEST or AEDT and name the person who can restore the database if a shared constraint appears. Monitor error logs, queue workers and storage capacity after release rather than waiting for a customer to report it.
Start with one additional root page, one new hostname and a restored staging snapshot. Prove the shared asset path, both language routes and the first production deployment before inviting traffic. That controlled release gives the Australian team a dependable base for the next domain without turning shared data into a single point of confusion.
cat ~/interests.json
| Key | Value |
|---|---|
| editor | Terminal-first workflow |
| os | Mac OS X / Unix |
| vcs | Git, distributed version control |
| deploy | Capistrano, cron automation |
| graphics | SVG, Adobe Illustrator troubleshooting |
| networking | IP validation, SSH, VPN |
git log --oneline --reverse
Solving SVG import issues in Adobe Illustrator CS6 and CC
When importing an SVG into Illustrator, the operation fails with an unknown error [CANT]. A workaround for this Adobe-side bug.
Solving NDK build issues on OS X
Troubleshooting native development kit compilation problems on Mac OS X.
Programmatically adding PHP generated TypoScript to the backend configuration
Integrating dynamically generated TypoScript into Typo3 backend setups using PHP.
ArgumentError: Could not parse PKey: no start line
Debugging an SSH key parsing error encountered during deployment.
Validating IP-Addresses in PHP
Using PHP filter functions with flags like FILTER_FLAG_IPV4 and FILTER_FLAG_IPV6, and understanding how filter_var handles reserved IP addresses.
Cocoa: Using NSTrackingArea
A short tutorial on using Cocoa's NSTrackingArea to capture mouseEntered and mouseExited events.
cat ~/contact.txt