howto > sosa

(june 2023)

Sosa²⁰ module for webtrees

The Sosa module is forked from the module written by André Dumas for webtrees 1.5. In particular, it uses the structure of the wt_sosa table created by this module, which contains the Sosa number and corresponding generation for each person and each gedcom.

At startup, we check if the table exists and if not we create it¹. The table is updated from time to time, on request of an editor. When an individual’s page is displayed, the module simply reads the table without recalculating the Sosa numbers each time.
¹ With some configurations (php ≥ 8), an error message is displayed but the table is created anyway. Reload the page to continue.

sosa²⁰ + webtrees 2.0

The Sosa²⁰ module fits with the 2.0 and 2.1 versions. For webtrees 1.7, use Sosa¹⁷.

help In the numbering of Sosa-Stradonitz, number 1 is assigned to the root of the family tree (Wikipedia).

define a valid root

For each tree (ie each gedcom file), a “default individual” must be defined. It will be used as a root (de cujus) for the calculation of the Sosa numbers.

control pannel

If the sosa table has not been filled in, a user with editing rights is asked to update it.

lets update

update done

Note: the number of generations processed is defined by the $maxgen=21 parameter in the update.phtml file. A higher value may cause a memory overflow.

organisation des fichiersDownload Download Sosa²⁰ for webtrees 2.0 and 2.1 (2023-07 version). It includes three files that must be placed in the modules_v4/sosa20 folder.

Télécharger For testing, Sosa²² for webtrees 2.2, incompatible with 2.0 et 2.1.


The module has been adapted to the specific case of the site, in particular to take into account the masking of the root. To get around this, we display the great-grandparent - visible to simple visitors - of which the person is the ancestor, as well as a Sosa number calculated from it.

The same approach is used for several collateral branches whose roots are also hidden from the visitors. Here again, the great-grandparents concerned are displayed.

Sosa or not, there is always a relationship between the person and the tree root (click on it) because all the individuals in the database are related by blood or marriage.

Bernardo Gallo


Click on the images to access the corresponding pages.

sosa recalculated from a great-grandparent

Back to
general information