1c05183b1SGreg Roach![Latest version)](https://img.shields.io/github/v/release/fisharebest/webtrees?sort=semver) 20098f575SGreg Roach![Licence](https://img.shields.io/github/license/fisharebest/webtrees) 3a592e1c1SGreg Roach[![Build Status](https://travis-ci.org/fisharebest/webtrees.svg?branch=master)](https://travis-ci.org/fisharebest/webtrees) 4ad92d32aSGreg Roach[![Coverage Status](https://coveralls.io/repos/github/fisharebest/webtrees/badge.svg?branch=master)](https://coveralls.io/github/fisharebest/webtrees?branch=master) 5ba2c9f9fSGreg Roach[![Translation status](https://weblate.iet.open.ac.uk/widgets/webtrees/-/svg-badge.svg)](https://weblate.iet.open.ac.uk/projects/webtrees/webtrees/) 6e48069ebSGreg Roach[![SensioLabsInsight](https://insight.sensiolabs.com/projects/78a5ba19-7ddf-4a58-8262-1c8a149f38de/mini.png)](https://insight.sensiolabs.com/projects/78a5ba19-7ddf-4a58-8262-1c8a149f38de) 7c9b50c59SGreg Roach[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/fisharebest/webtrees/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/fisharebest/webtrees/?branch=master) 882f63a0eSGreg Roach[![Code Climate](https://codeclimate.com/github/fisharebest/webtrees/badges/gpa.svg)](https://codeclimate.com/github/fisharebest/webtrees) 9a4eb115aSGreg Roach[![StyleCI](https://github.styleci.io/repos/11836349/shield?branch=master)](https://github.styleci.io/repos/11836349) 103344c7f9SGreg Roach 116ccdf4f0SGreg Roach# webtrees - online collaborative genealogy 12fac25c68SRico Sonntag 13e00de034SGreg RoachThe project’s website is [www.webtrees.net](https://www.webtrees.net). 1487f36d93SGreg RoachFurther documentation is available at [wiki.webtrees.net](https://wiki.webtrees.net) and [webtrees.github.io](https://webtrees.github.io). 15b4ef7f82SRico Sonntag 16fac25c68SRico Sonntag## Contents 17fac25c68SRico Sonntag 18fac25c68SRico Sonntag* [License](#license) 196ccdf4f0SGreg Roach* [Coding styles and standards](#coding-styles-and-standards) 20fac25c68SRico Sonntag* [Introduction](#introduction) 2126a22ad2SJustCarmen* [System requirements](#system-requirements) 22bd82e704SDavid Drury* [Internet browser compatibility](#internet-browser-compatibility) 23fac25c68SRico Sonntag* [Installation](#installation) 24fac25c68SRico Sonntag* [Upgrading](#upgrading) 25bd82e704SDavid Drury* [Building and developing](#building-and-developing) 2626a22ad2SJustCarmen* [Gedcom (family tree) files](#gedcom-family-tree-files) 27fac25c68SRico Sonntag* [Security](#security) 28fac25c68SRico Sonntag* [Backup](#backup) 29fac25c68SRico Sonntag 30b4ef7f82SRico Sonntag 316ccdf4f0SGreg Roach## License 32fac25c68SRico Sonntag 33a25f0a04SGreg Roach* **webtrees: online genealogy** 346ccdf4f0SGreg Roach* Copyright 2019 webtrees development team 35fac25c68SRico Sonntag 36a25f0a04SGreg RoachThis program is free software: you can redistribute it and/or modify 37a25f0a04SGreg Roachit under the terms of the GNU General Public License as published by 38a25f0a04SGreg Roachthe Free Software Foundation, either version 3 of the License, or 39a25f0a04SGreg Roach(at your option) any later version. 40fac25c68SRico Sonntag 41a25f0a04SGreg RoachThis program is distributed in the hope that it will be useful, 42a25f0a04SGreg Roachbut WITHOUT ANY WARRANTY; without even the implied warranty of 43a25f0a04SGreg RoachMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 44a25f0a04SGreg RoachGNU General Public License for more details. 45fac25c68SRico Sonntag 46a25f0a04SGreg RoachYou should have received a copy of the GNU General Public License 47a25f0a04SGreg Roachalong with this program. If not, see <http://www.gnu.org/licenses/>. 48fac25c68SRico Sonntag 496ccdf4f0SGreg Roach## Coding styles and standards 50fac25c68SRico Sonntag 516ccdf4f0SGreg Roachwebtrees follows the [PHP Standards Recommendations](https://www.php-fig.org/psr). 526ccdf4f0SGreg Roach 536ccdf4f0SGreg Roach* [PSR-1](https://www.php-fig.org/psr/psr-1) - Basic Coding Standard 546ccdf4f0SGreg Roach* [PSR-2](https://www.php-fig.org/psr/psr-2) - Coding Style Guide 556ccdf4f0SGreg Roach* [PSR-4](https://www.php-fig.org/psr/psr-4) - Autoloading Stardard 56c692965aSGreg Roach* [PSR-6](https://www.php-fig.org/psr/psr-6) - Cache 576ccdf4f0SGreg Roach* [PSR-7](https://www.php-fig.org/psr/psr-7) - HTTP Message Interface 586ccdf4f0SGreg Roach* [PSR-11](https://www.php-fig.org/psr/psr-11) - Container Interface 59cb55cd99SGreg Roach* [PSR-12](https://www.php-fig.org/psr/psr-12) - Extended Coding Style Guide 606ccdf4f0SGreg Roach* [PSR-15](https://www.php-fig.org/psr/psr-15) - HTTP Handlers 616ccdf4f0SGreg Roach* [PSR-17](https://www.php-fig.org/psr/psr-17) - HTTP Factories 626ccdf4f0SGreg Roach 63cb55cd99SGreg RoachWe do not currently use [PSR-3 (logging)](https://www.php-fig.org/psr/psr-3) - but we plan to do so in the future. 646ccdf4f0SGreg Roach 656ccdf4f0SGreg Roach## Introduction 66fac25c68SRico Sonntag 67fac25c68SRico Sonntag**webtrees** is the web's leading online collaborative genealogy application. 68fac25c68SRico Sonntag 69fac25c68SRico Sonntag* It works from standard GEDCOM files, and is therefore compatible with every 70fac25c68SRico Sonntagmajor desktop application. 71fac25c68SRico Sonntag* It aims to to be efficient and effective by using the right combination of 72fac25c68SRico Sonntagthird-party tools, design techniques and open standards. 73fac25c68SRico Sonntag 74fac25c68SRico Sonntag**webtrees** allows you to view and edit your genealogy on your website. It has 75e667f3d4SGreg Roachfull editing capabilities, full privacy functions, and supports imedia such as 76fac25c68SRico Sonntagphotos and document images. As an online program, it fosters extended family 77fac25c68SRico Sonntagparticipation and good ancestral recording habits, as it simplifies the process 78fac25c68SRico Sonntagof collaborating with others working on your family lines. Your latest information 79fac25c68SRico Sonntagis always on your web site and available for others to see, defined by viewing 80fac25c68SRico Sonntagrules you set. For more information and to see working demos, visit 81cdc90107SGreg Roach[webtrees.net](https://webtrees.net/). 82fac25c68SRico Sonntag 83fac25c68SRico Sonntag**webtrees** is Open Source software that has been produced by people from many 84fac25c68SRico Sonntagcountries freely donating their time and talents to the project. All service, 85fac25c68SRico Sonntagsupport, and future development is dependent on the time developers are willing 86fac25c68SRico Sonntagto donate to the project, often at the expense of work, recreation, and family. 87fac25c68SRico SonntagBeyond the few donations received from users, developers receive no compensation 88fac25c68SRico Sonntagfor the time they spend working on the project. There is also no outside source 89fac25c68SRico Sonntagof revenue to support the project. Please consider these circumstances when 90fac25c68SRico Sonntagmaking support requests and consider volunteering your own time and skills to make 91fac25c68SRico Sonntagthe project even stronger and better. 92fac25c68SRico Sonntag 93fac25c68SRico Sonntag 946ccdf4f0SGreg Roach## System requirements 95fac25c68SRico Sonntag 96fac25c68SRico SonntagTo install **webtrees**, you need: 97fac25c68SRico Sonntag 98*56379645SGreg Roach* A webserver. Apache, NGINX and IIS are the most common types. To use “Pretty URLs”, you will need to configure URL rewriting" 99*56379645SGreg Roach* A database. MySQL is recommended, although PostgreSQL, SQL-Server and SQLite can be used. Some features rely on MySQL for collation. Other database might not sort names according to local rules. **webtrees** uses a prefix for its table names, so you can install several instances of webtrees in the same database. 100*56379645SGreg Roach* Approximately 100MB of disk space for the application files, plus whatever is 101e667f3d4SGreg Roach needed for your media files, GEDCOM files and database. 102*56379645SGreg Roach* PHP 7.1 - 7.4. Servers with PHP 5.3 - 7.0 can use **webtrees** 1.7. 103fac25c68SRico Sonntag * PHP should be configured to allow sufficient server resources (memory and 104fac25c68SRico Sonntag execution time) for the size of your system. Typical requirements are: 105e667f3d4SGreg Roach * Small systems (500 individuals): 16–32 MB, 10–20 seconds 106e667f3d4SGreg Roach * Medium systems (5,000 individuals): 32–64 MB, 20–40 seconds 107e667f3d4SGreg Roach * Large systems (50,000 individuals): 64–128 MB, 40–80 seconds 1083606202eSDavid Drury 109*56379645SGreg Roach## Browser compatibility 1103606202eSDavid Drury 111*56379645SGreg Roach **webtrees** is tested on recent versions of popular browsers such as Edge, Firefox, 112*56379645SGreg Roach Chrome, and Safari. Support for other browsers and older versions is on a case-by-case basis. 113fac25c68SRico Sonntag 1146ccdf4f0SGreg Roach## Installation 115fac25c68SRico Sonntag 116*56379645SGreg Roach1. Download the .ZIP file for latest stable version from [github.com](https://github.com/fisharebest/webtrees/releases/latest) 117*56379645SGreg Roach2. Unzip the files and then upload them to an empty folder on your web server. 118fac25c68SRico Sonntag3. Open your web browser and type the URL for your **webtrees** site (for example, 119f0195b90SDavid Drury ``http://www.yourserver.com/webtrees`` into the address bar. 120*56379645SGreg Roach4. The **webtrees** setup wizard will start automatically. 121fac25c68SRico Sonntag 122*56379645SGreg RoachYour first task will be to create a family tree. 123fac25c68SRico Sonntag 124*56379645SGreg RoachIf you have a GEDCOM file, you can import it into the tree. If not, just start 125*56379645SGreg Roachentering your family tree. 126fac25c68SRico Sonntag 127*56379645SGreg RoachThere are lots of configuration options. You'll probably want to review the 128fac25c68SRico Sonntagprivacy settings first. Don't worry too much about all the other options - the 129*56379645SGreg Roachdefaults are good for most people. If you get stuck, you can get friendly help 130*56379645SGreg Roachand advice from the [help](https://webtrees.net/forums) forum. 131fac25c68SRico Sonntag 132fac25c68SRico Sonntag 1336ccdf4f0SGreg Roach## Upgrading 134b4ef7f82SRico Sonntag 135fac25c68SRico SonntagUpgrading **webtrees** is quick and easy. It is strongly recommended that you 136fac25c68SRico Sonntagupgrade your installation whenever a new version is made available. Even minor 137fac25c68SRico Sonntag**webtrees** version updates usually contain a significant number of bug fixes 1383606202eSDavid Druryas well as interface improvements and program enhancements. 139fac25c68SRico Sonntag 140f0195b90SDavid Drury* **Automatic upgrade** 141f0195b90SDavid Drury 1423606202eSDavid Drury **webtrees** has an automatic upgrade facility. An administrator upon logging in 1433606202eSDavid Drurywill receive notification when a new version is available and an option to start 1443606202eSDavid Drurythe automatic upgrade. If for some reason the automatic upgrade should fail 1453606202eSDavid Drurythen a manual upgrade should be performed. 1463606202eSDavid Drury 147f0195b90SDavid Drury* **Manual upgrade** 148f0195b90SDavid Drury 149fac25c68SRico Sonntag 1. Now would be a good time to make a [backup](#backup). 150fac25c68SRico Sonntag 2. Download the latest version of **webtrees** available from 151cdc90107SGreg Roach [webtrees.net](https://webtrees.net/) 152243bf6b4SGreg Roach 3. While you are in the middle of uploading the new files, 153fac25c68SRico Sonntag a visitor to your site would encounter a mixture of new and old files. This 154b3a775f6SGreg Roach could cause unpredictable behavior or errors. To prevent this, create the 155fac25c68SRico Sonntag file **data/offline.txt**. While this file exists, visitors will see a 156243bf6b4SGreg Roach “site unavailable - come back later” message. 157fac25c68SRico Sonntag 4. Unzip the .ZIP file, and upload the files to your web server, overwriting the existing files. 158fac25c68SRico Sonntag 5. Delete the file **data/offline.txt** 159fac25c68SRico Sonntag 1603606202eSDavid Drury 1616ccdf4f0SGreg Roach### Note for Macintosh users 162b4ef7f82SRico Sonntag 163fac25c68SRico SonntagStep 4 assumes you are using a copy tool that **merges** directories rather than 164b3a775f6SGreg Roachreplaces them. (**Merge** is standard behavior on Windows and Linux.) If you use 165fac25c68SRico Sonntagthe Macintosh Finder or other similar tool to perform step 3, it will **replace** 166fac25c68SRico Sonntagyour configuration, media and other directories with the empty/default ones from 167fac25c68SRico Sonntagthe installation. This would be very bad (but you did take a backup in step 1, 168fac25c68SRico Sonntagdidn't you!). Further details and recommendations for suitable tools can be found 169fac25c68SRico Sonntagby searching [google.com](http://google.com). 170fac25c68SRico Sonntag 171fac25c68SRico Sonntag 1726ccdf4f0SGreg Roach## Building and developing 173bd82e704SDavid Drury 174bd82e704SDavid DruryIf you want to build webtrees from source, or modify the code, you'll need to install 175bd82e704SDavid Drurya couple of tools first. 176bd82e704SDavid Drury 177bd82e704SDavid DruryYou will need [composer](https://getcomposer.org/) to install the PHP dependencies. 178bd82e704SDavid DruryThen run this command:: 179bd82e704SDavid Drury 180bd82e704SDavid Drury* php composer.phar install 181bd82e704SDavid Drury 182bd82e704SDavid DruryYou will need [npm](https://www.npmjs.com/get-npm) to install the Javascript dependencies. 183bd82e704SDavid DruryThen run the commands: 184bd82e704SDavid Drury 185bd82e704SDavid Drury* npm install 1869845ccc6SRico Sonntag* npm run production 187bd82e704SDavid Drury 188bd82e704SDavid DruryYou will need to re-run the second of these any time you modify the file `webtrees.js`. 189fac25c68SRico Sonntag 1906ccdf4f0SGreg Roach## Gedcom (family tree) files 191fac25c68SRico Sonntag 192*56379645SGreg RoachWhen you import a family tree (GEDCOM) file in **webtrees** the 1933606202eSDavid Drurydata from the file is transferred to the database tables. The file itself 194f0195b90SDavid Druryremains in the **webtrees/data** folder and is no longer used or required 195f0195b90SDavid Druryby **webtrees**. Any subsequent editing of the **webtrees** data 1963606202eSDavid Drurywill not change this file 197fac25c68SRico Sonntag 198fac25c68SRico SonntagWhen or if you change your genealogy data outside of **webtrees**, it is not 199fac25c68SRico Sonntagnecessary to delete your GEDCOM file or database from **webtrees** and start 200fac25c68SRico Sonntagover. Follow these steps to update a GEDCOM that has already been imported: 201fac25c68SRico Sonntag 2023606202eSDavid Drury* Go to ``Control panel`` -> ``Manage family trees`` On the line relating to this particular family tree (GEDCOM) 2033606202eSDavid Drury file (or a new one) select IMPORT. 204243bf6b4SGreg Roach* Take careful note of the media items option (_“If you have created media objects 205ed1bbedbSGreg Roach in **webtrees**, and have edited your data off-line using software that 206fac25c68SRico Sonntag deletes media objects, then tick this box to merge the current media objects 207243bf6b4SGreg Roach with the new GEDCOM.”_) In most cases you should leave this box **UNCHECKED**. 208243bf6b4SGreg Roach* Click “SAVE”. **webtrees** will validate the GEDCOM again before importing. 209fac25c68SRico Sonntag During this process, **webtrees** copies your entire family tree (GEDCOM file) 210fac25c68SRico Sonntag to a 'chunk' table within your database. Depending on the coding of your file, 211fac25c68SRico Sonntag its file size and the capabilities of your server and the supporting software, 212fac25c68SRico Sonntag this may take some time. **No progress bar will show while the data is being 213fac25c68SRico Sonntag copied** and should you navigate away from this page, the process is suspended. 214fac25c68SRico Sonntag It will start again when you return to the Family Tree management page. 215fac25c68SRico Sonntag 216fac25c68SRico Sonntag 2176ccdf4f0SGreg Roach### Gedcom file Formats 218fac25c68SRico Sonntag 219fac25c68SRico SonntagEvery Family History program has its own method of creating GEDCOM files, and 220fac25c68SRico Sonntagdiffering output format options to select from. **webtrees'** import routines 221fac25c68SRico Sonntagcan read many different formats, but not necessarily all. If your software has 222243bf6b4SGreg Roacha “UTF8” option you should always use that. However, **webtrees** has been 223fac25c68SRico Sonntagtested with these alternative formats: 224fac25c68SRico Sonntag 225fac25c68SRico Sonntag* ANSI 226fac25c68SRico Sonntag * imports OK, but is slow due to the translation into UTF8 as part 227fac25c68SRico Sonntag of the import process. 228fac25c68SRico Sonntag* MAC 229fac25c68SRico Sonntag * imports OK, but is slow due to the translation into UTF8 as part 230fac25c68SRico Sonntag of the import process. 231fac25c68SRico Sonntag* DOS 232fac25c68SRico Sonntag * imports OK, but is slow due to the translation into UTF8 as part 233fac25c68SRico Sonntag of the import process. 234fac25c68SRico Sonntag* ANSEL 235243bf6b4SGreg Roach * currently will not import. Gives warning *Error: cannot convert 236243bf6b4SGreg Roach GEDCOM file from ANSEL encoding to UTF-8 encoding*. Later releases 2373606202eSDavid Drury of **webtrees** may include the facility to translate from ANSEL to UTF8, 2383606202eSDavid Drury but for now a standalone utility [is available here](https://dev.webtrees.net/ansel/) 2393606202eSDavid Drury and should be used to convert the format to UTF-8 prior to importing. 240fac25c68SRico Sonntag 241fac25c68SRico Sonntag 2426ccdf4f0SGreg Roach## Security 243fac25c68SRico Sonntag 244fac25c68SRico Sonntag**Security** in _webtrees_ means ensuring your site is safe from unwanted 245fac25c68SRico Sonntagintrusions, hacking, or access to data and configuration files. The developers 246fac25c68SRico Sonntagof _webtrees_ regard security as an extremely important part of its development 247fac25c68SRico Sonntagand have made every attempt to ensure your data is safe. 248fac25c68SRico Sonntag 2493606202eSDavid DruryThe area most at risk of intrusion would be the **/data** folder that contains your 250fac25c68SRico Sonntagconfig.ini.php file, and various temporary files. If you are concerned there 251bd82e704SDavid Drurymay be a risk there is a very simple test you can do: try to fetch the file 252bd82e704SDavid Druryconfig.ini.php by typing **``url_to_your_server/data/config.ini.php``** in your web 253fac25c68SRico Sonntagbrowser. 254fac25c68SRico Sonntag 255243bf6b4SGreg RoachThe most likely result is an “access denied” message like this: 256fac25c68SRico Sonntag 257fac25c68SRico Sonntag Forbidden 258fac25c68SRico Sonntag 259f0195b90SDavid Drury You don't have permission to access /data/config.ini.php on this server. 260fac25c68SRico Sonntag 261fac25c68SRico SonntagThis indicates that the protection built into **webtrees** is working, and no 262fac25c68SRico Sonntagfurther action is required. 263fac25c68SRico Sonntag 264fac25c68SRico SonntagIn the unlikely event you do fetch the file (you will just see a semicolon), 265fac25c68SRico Sonntagthen that protection is not working on your site and you should take some further 266fac25c68SRico Sonntagaction. 267fac25c68SRico Sonntag 2683606202eSDavid DruryIf your server runs PHP in CGI mode, then change the permission of the **/data** 2693606202eSDavid Druryfolder to 700 instead of 777. This will block access to the httpd process, 270fac25c68SRico Sonntagwhile still allowing access to PHP scripts. 271fac25c68SRico Sonntag 272fac25c68SRico SonntagThis will work for perhaps 99% of all users. Only the remaining 1% should consider 2733606202eSDavid Drurythe most complex solution, moving the **/data** folder out of accessible web 274fac25c68SRico Sonntagspace. (**_Note:_** In many shared hosting environments this is not an option anyway.) 275fac25c68SRico Sonntag 276fac25c68SRico SonntagIf you do find it necessary, following is an example of the process required: 277fac25c68SRico Sonntag 2783606202eSDavid DruryIf your home folder is something like **/home/username**, 2793606202eSDavid Druryand the root folder for your web site is **/home/username/public_html**, 2803606202eSDavid Druryand you have installed **webtrees** in the **public_html/webtrees** folder, 2813606202eSDavid Drurythen you would create a new **data** folder in your home folder at the same 2823606202eSDavid Drurylevel as your public_html folder, such as **/home/username/private/data**, 283fac25c68SRico Sonntagand place your GEDCOM (family tree) file there. 284fac25c68SRico Sonntag 2853606202eSDavid DruryThen change the **Data folder** setting on the ``Control panel`` -> 2863606202eSDavid Drury``Website`` -> ``Website preferences`` page from the default **data/** to the new 287fac25c68SRico Sonntaglocation **/home/username/private/data** 288fac25c68SRico Sonntag 289fac25c68SRico SonntagYou will have **two** data directories: 290fac25c68SRico Sonntag 291fac25c68SRico Sonntag* [path to webtrees]/data - just needs to contain config.ini.php 292fac25c68SRico Sonntag* /home/username/private/data - contains everything else 293fac25c68SRico Sonntag 294fac25c68SRico Sonntag 2956ccdf4f0SGreg Roach## Backup 296fac25c68SRico Sonntag 297fac25c68SRico SonntagBackups are good. Whatever problem you have, it can always be fixed from a good 298fac25c68SRico Sonntagbackup. 299fac25c68SRico Sonntag 3003606202eSDavid DruryTo make a backup of **webtrees**, you need to make a copy of the following 301fac25c68SRico Sonntag 3023606202eSDavid Drury1. The files in the *webtrees/data* folder. 3033606202eSDavid Drury2. The files in the *webtrees/media* folder. 304fac25c68SRico Sonntag3. The tables in the database. Freely available tools such as 305fac25c68SRico Sonntag [phpMyAdmin](http://www.phpmyadmin.net) allow you to do this in one click. 306fac25c68SRico Sonntag 307fac25c68SRico SonntagRemember that most web hosting services do NOT backup your data, and this is 308fac25c68SRico Sonntagyour responsibility. 309