1[![Latest Stable Version](https://poser.pugx.org/fisharebest/webtrees/v/stable.svg)](https://packagist.org/packages/fisharebest/webtrees) 2[![Build Status](https://travis-ci.org/fisharebest/webtrees.svg?branch=master)](https://travis-ci.org/fisharebest/webtrees) 3[![Coverage Status](https://coveralls.io/repos/github/fisharebest/webtrees/badge.svg?branch=master)](https://coveralls.io/github/fisharebest/webtrees?branch=master) 4[![Translation status](https://translate.webtrees.net/widgets/webtrees/-/svg-badge.svg)](https://translate.webtrees.net/engage/webtrees/?utm_source=widget) 5[![SensioLabsInsight](https://insight.sensiolabs.com/projects/78a5ba19-7ddf-4a58-8262-1c8a149f38de/mini.png)](https://insight.sensiolabs.com/projects/78a5ba19-7ddf-4a58-8262-1c8a149f38de) 6[![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) 7[![Code Climate](https://codeclimate.com/github/fisharebest/webtrees/badges/gpa.svg)](https://codeclimate.com/github/fisharebest/webtrees) 8 9# webtrees 10 11The project’s website is [www.webtrees.net](https://www.webtrees.net). 12Further documentation is available at [wiki.webtrees.net](https://wiki.webtrees.net) and [webtrees.github.io](https://webtrees.github.io). 13 14## Contents 15 16* [License](#license) 17* [Introduction](#introduction) 18* [System requirements](#system-requirements) 19* [Installation](#installation) 20* [Upgrading](#upgrading) 21* [Gedcom (family tree) files](#gedcom-family-tree-files) 22* [Security](#security) 23* [Backup](#backup) 24* [Converting from phpgedview](#converting-from-phpgedview) 25 26 27### License 28 29* **webtrees: online genealogy** 30* Copyright (C) 2017 webtrees development team 31 32This program is free software: you can redistribute it and/or modify 33it under the terms of the GNU General Public License as published by 34the Free Software Foundation, either version 3 of the License, or 35(at your option) any later version. 36 37This program is distributed in the hope that it will be useful, 38but WITHOUT ANY WARRANTY; without even the implied warranty of 39MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 40GNU General Public License for more details. 41 42You should have received a copy of the GNU General Public License 43along with this program. If not, see <http://www.gnu.org/licenses/>. 44 45 46### Introduction 47 48**webtrees** is the web's leading online collaborative genealogy application. 49 50* It works from standard GEDCOM files, and is therefore compatible with every 51major desktop application. 52* It aims to to be efficient and effective by using the right combination of 53third-party tools, design techniques and open standards. 54 55**webtrees** allows you to view and edit your genealogy on your website. It has 56full editing capabilities, full privacy functions, and supports imedia such as 57photos and document images. As an online program, it fosters extended family 58participation and good ancestral recording habits, as it simplifies the process 59of collaborating with others working on your family lines. Your latest information 60is always on your web site and available for others to see, defined by viewing 61rules you set. For more information and to see working demos, visit 62[webtrees.net](https://webtrees.net/). 63 64**webtrees** is Open Source software that has been produced by people from many 65countries freely donating their time and talents to the project. All service, 66support, and future development is dependent on the time developers are willing 67to donate to the project, often at the expense of work, recreation, and family. 68Beyond the few donations received from users, developers receive no compensation 69for the time they spend working on the project. There is also no outside source 70of revenue to support the project. Please consider these circumstances when 71making support requests and consider volunteering your own time and skills to make 72the project even stronger and better. 73 74 75### System requirements 76 77To install **webtrees**, you need: 78 79* A webserver. Apache and IIS are the most common types. There are no requirements 80 to use a specific type or version. 81* Approximately 65MB of disk space for the application files, plus whatever is 82 needed for your media files, GEDCOM files and database. 83* PHP 5.6 or later. Servers with PHP 5.3 - 5.5 should use webtrees 1.7. Servers with PHP 5.2 should use webtrees 1.4. 84 * PHP should be configured with the PHP/PDO library for MySQL. This is a 85 server configuration option. It is enabled by default on most hosts. 86 See [http://php.net/pdo](http://php.net/pdo) 87 * PHP should be configured to allow sufficient server resources (memory and 88 execution time) for the size of your system. Typical requirements are: 89 * Small systems (500 individuals): 16–32 MB, 10–20 seconds 90 * Medium systems (5,000 individuals): 32–64 MB, 20–40 seconds 91 * Large systems (50,000 individuals): 64–128 MB, 40–80 seconds 92* MySQL 5.0.13 or later. Note that **webtrees** can share a single database 93 with other applications, by choosing a unique table prefix during configuration. 94 If the number of databases is not restricted, you can set up a database purely 95 for use by **webtrees** and create a separate user and password for only 96 your genealogy. 97* Internet browser compatibility. **webtrees** supports the use of most 98 current versions of open-source browsers such as Firefox, Chrome, and Safari. 99 We will do our best to support others such as Opera and Internet Explorer, 100 though not their earlier versions. Currently many things do not work well in 101 IE7, and some not in IE8 either. We strongly recommend anyone using these 102 obsolete browsers upgrade as soon as possible. We are also aware that IE 103 provides poor RTL language support generally, so cannot recommend it for 104 sites requiring RTL languages. 105* To view sites that contain both left-to-right and right-to-left text (e.g. 106 English data on Hebrew pages), you will need to use a browser that provides 107 support for the HTML5 **dir="auto"** attribute. At present, Internet Explorer 108 (11 and lower) do not support this. 109* HTML Frames. Note that **webtrees** uses cookies to track login sessions. Sites 110 that make **webtrees** pages available inside an HTML Frames will encounter 111 problems with login for versions 7, 8, and 9 of Internet Explorer. IE users 112 should review the ``Privacy settings Tools`` / ``Internet Options`` for more details. 113 114 115### Installation 116 117Installing **webtrees** is really easy. All you need is a webserver with PHP and 118MySQL. Almost every web hosting service provides these, but be sure to confirm 119that those supplied meet or exceed the minimum system requirements. 120 1211. Download latest stable version from [webtrees.net](https://webtrees.net/) 1222. Unzip the files and upload them to an empty directory on your web server. 1233. Open your web browser and type the URL for your **webtrees** site (for example, 124 [http://www.yourserver.com/webtrees](http://www.yourserver.com/webtrees)) into 125 the address bar. 1264. The **webtrees** setup wizard will start automatically. Simply follow the steps, 127 answering each question as you proceed. (See '''Step Six''' procedure below.) 128 129That's it! 130 131However, before you can use **webtrees**, you need one (or possibly more) GEDCOM 132(family tree) files. If you have been doing your research using a desktop program 133such as Family Tree Maker, you can use it's “save as GEDCOM” function to create 134a GEDCOM file. If you are starting from scratch, then **webtrees** can create a 135GEDCOM file for you. Alternatively, you can import data directly from PhpGedView. 136 137So, after installation, you'll be directed to the GEDCOM (family tree) 138administration page, where you'll need to select one of the following options: 139 140* On successful completion of all steps you will be taken to the GEDCOM (family tree) 141 administration page where you can: 142 * UPLOAD a GEDCOM file from your local machine 143 * ADD a GEDCOM file from your server, (if your GEDCOM file is too large to upload, 144 you can copy it to the webtrees/data folder, and load it from there) 145 * CREATE a new, empty GEDCOM file 146 * TRANSFER your existing PhpGedView data straight into **webtrees**, using the 147 PhpGedView-to-**webtrees** wizard described in section 9 below: 148 [Converting from phpgedview](#converting-from-phpgedview) 149 150There are *lots* of configuration options. You'll probably want to review the 151privacy settings first. Don't worry too much about all the other options - the 152defaults are good for most people. If you get stuck, there's lots of built-in 153help and you can get friendly advice from the [help](https://webtrees.net/forums) 154forum. 155 156 157### Upgrading 158 159Upgrading **webtrees** is quick and easy. It is strongly recommended that you 160upgrade your installation whenever a new version is made available. Even minor 161**webtrees** version updates usually contain a significant number of bug fixes 162as well as interface improvements and program enhancements. The Administration 163page of your **webtrees** installation will display a notification whenever a 164new version is available. 165 1661. Now would be a good time to make a [backup](#backup). 1672. Download the latest version of **webtrees** available from 168 [webtrees.net](https://webtrees.net/) 1693. While you are in the middle of uploading the new files, 170 a visitor to your site would encounter a mixture of new and old files. This 171 could cause unpredictable behaviour or errors. To prevent this, create the 172 file **data/offline.txt**. While this file exists, visitors will see a 173 “site unavailable - come back later” message. 1744. Unzip the .ZIP file, and upload the files to your web server, overwriting the existing files. 1755. Delete the file **data/offline.txt** 176 177### Building and developing 178 179If you want to build webtrees from source, or modify the code, you'll need to install 180a couple of tools first. 181 182You will need [composer](https://getcomposer.org/) to install the PHP dependencies. 183Then run this command:: 184 185* php composer.phar install 186 187You will need [npm](https://www.npmjs.com/get-npm) to install the Javascript dependencies. 188Then run the commands: 189 190* npm install 191* npm run prod 192 193You will need to re-run the second of these any time you modify the file `webtrees.js`. 194 195 196#### Note for Macintosh users 197 198Step 4 assumes you are using a copy tool that **merges** directories rather than 199replaces them. (**Merge** is standard behaviour on Windows and Linux.) If you use 200the Macintosh Finder or other similar tool to perform step 3, it will **replace** 201your configuration, media and other directories with the empty/default ones from 202the installation. This would be very bad (but you did take a backup in step 1, 203didn't you!). Further details and recommendations for suitable tools can be found 204by searching [google.com](http://google.com). 205 206 207#### Note for anyone using custom code (modules, themes, etc.). 208 209It is **very likely** that your custom code will not work when you upgrade 210**webtrees**. 211 212**We recommend that you disable all custom code before you apply the upgrade.** 213 214Disable custom modules, switch over to a standard 215theme, and remove any code “hacks”. Once the upgrade is complete and you are satisfied 216your site is fully operational contact the source of those modules or themes for 217a new version. 218 219 220#### General note 221 222Depending on the changes in the new files, your browser configuration 223and possibly other factors, it is always wise to clear both the **webtrees** cache 224and your browser cache immediately after the upgrade is completed. The **webtrees** 225cache can be cleared simply by going to ``Administration`` -> 226``Cleanup data directory`` and deleting the cache. 227 228If you have any problems or questions, help is available on the 229[webtrees forum](https://www.webtrees.net/index.php/en/forum). 230 231 232### Gedcom (family tree) files 233 234When you ADD, IMPORT or UPLOAD a family tree (GEDCOM) file in **webtrees** the 235data from the file is all transferred to the database tables. The file itself is 236no longer used or required by **webtrees** 237 238* If you use ADD or IMPORT, your file remains in the webtrees/data folder you 239 first copied it to, and will not be changed by any subsequent editing of the 240 **webtrees** data. 241* If you use UPLOAD, the file is left in its original location, and again remains 242 untouched. 243 244When or if you change your genealogy data outside of **webtrees**, it is not 245necessary to delete your GEDCOM file or database from **webtrees** and start 246over. Follow these steps to update a GEDCOM that has already been imported: 247 248* Decide if you want to IMPORT or UPLOAD your new GEDCOM file. 249 * Use UPLOAD if your family tree file is smaller than your server's PHP file 250 upload limit (often 2MB).The new file can have any name you choose. 251 * Use IMPORT for larger files. In this case you need to use FTP to first copy 252 your file to the webtrees/data folder. Either copy over the existing file, 253 or use a different name. 254* From the Administration page, go to your **webtrees** Family trees (GEDCOM) 255 configuration page. On the line relating to this particular family tree (GEDCOM) 256 file (or a new one) click either IMPORT or UPLOAD. 257* Take careful note of the media items option (_“If you have created media objects 258 in **webtrees**, and have edited your data off-line using software that 259 deletes media objects, then tick this box to merge the current media objects 260 with the new GEDCOM.”_) In most cases you should leave this box **UNCHECKED**. 261* Click “SAVE”. **webtrees** will validate the GEDCOM again before importing. 262 During this process, **webtrees** copies your entire family tree (GEDCOM file) 263 to a 'chunk' table within your database. Depending on the coding of your file, 264 its file size and the capabilities of your server and the supporting software, 265 this may take some time. **No progress bar will show while the data is being 266 copied** and should you navigate away from this page, the process is suspended. 267 It will start again when you return to the Family Tree management page. 268 269 270#### FORMAT 271 272Every Family History program has its own method of creating GEDCOM files, and 273differing output format options to select from. **webtrees'** import routines 274can read many different formats, but not necessarily all. If your software has 275a “UTF8” option you should always use that. However, **webtrees** has been 276tested with these alternative formats: 277 278* ANSI 279 * imports OK, but is slow due to the translation into UTF8 as part 280 of the import process. 281* MAC 282 * imports OK, but is slow due to the translation into UTF8 as part 283 of the import process. 284* DOS 285 * imports OK, but is slow due to the translation into UTF8 as part 286 of the import process. 287* ANSEL 288 * currently will not import. Gives warning *Error: cannot convert 289 GEDCOM file from ANSEL encoding to UTF-8 encoding*. Later releases 290 of **webtrees** may include translation from ANSEL to UTF8, but this 291 is not a simple process. 292 293 294### Security 295 296**Security** in _webtrees_ means ensuring your site is safe from unwanted 297intrusions, hacking, or access to data and configuration files. The developers 298of _webtrees_ regard security as an extremely important part of its development 299and have made every attempt to ensure your data is safe. 300 301The area most at risk of intrusion would be the /data folder that contains your 302config.ini.php file, and various temporary files. If you are concerned there 303may be a risk there is a very simple test you can do: try to fetch **config.ini.php** 304by typing **http://_url to your site_/data/config.ini.php** in your web 305browser. 306 307The most likely result is an “access denied” message like this: 308 309 Forbidden 310 311 You don't have permission to access /data/xxxx.ged on this server. 312 313This indicates that the protection built into **webtrees** is working, and no 314further action is required. 315 316In the unlikely event you do fetch the file (you will just see a semicolon), 317then that protection is not working on your site and you should take some further 318action. 319 320If your server runs PHP in CGI mode, then change the permission of the /data 321directory to 700 instead of 777. This will block access to the httpd process, 322while still allowing access to PHP scripts. 323 324This will work for perhaps 99% of all users. Only the remaining 1% should consider 325the most complex solution, moving the /data/ directory out of accessible web 326space. (**_Note:_** In many shared hosting environments this is not an option anyway.) 327 328If you do find it necessary, following is an example of the process required: 329 330If your home directory is something like **/home/username**, 331and the root directory for your web site is **/home/username/public_html**, 332and you have installed **webtrees** in the **public_html/webtrees** directory, 333then you would create a new **data** folder in your home directory at the same 334level as your public_html directory, such as **/home/username/private/data**, 335and place your GEDCOM (family tree) file there. 336 337Then change the **Data file directory** setting on the ``Admin`` -> 338``Site Administration`` page from the default **data/** to the new 339location **/home/username/private/data** 340 341You will have **two** data directories: 342 343* [path to webtrees]/data - just needs to contain config.ini.php 344* /home/username/private/data - contains everything else 345 346 347#### Hypertext Transfer Protocol Secure (HTTPS) 348 349**webtrees** supports https access. If your website is configured with mandatory 350or optional https support **webtrees** will operate correctly in either mode. 351 352If your website is configured with optional https support, **webtrees** can be 353configured to switch to https at login. To enable https at login, set the Login 354URL setting on the ``Admin`` -> ``Site Administration`` -> 355``Configuration page`` to your https login URL, which is often in the form 356[https://example.com/admin.php](https://example.com/admin.php) 357(substitute your domain for example.com). 358 359**Warning:** Misconfiguration can disable your login links. If this occurs, 360access the login by typing the correct URL directly into your browser's address input. 361 362 363### Backup 364 365Backups are good. Whatever problem you have, it can always be fixed from a good 366backup. 367 368To make a backup of webtrees, you need to make a copy of the following 369 3701. The files in the *webtrees/data* directory. 3712. The files in the *webtrees/media* directory. 3723. The tables in the database. Freely available tools such as 373 [phpMyAdmin](http://www.phpmyadmin.net) allow you to do this in one click. 374 375Remember that most web hosting services do NOT backup your data, and this is 376your responsibility. 377 378 379### Converting from phpgedview 380 381If you are moving to **webtrees** from an existing PhpGedView setup, and 382your PhpGedView install meets certain requirements, **webtrees** has provided a “wizard” 383to help make the transfer of the majority of your data a relatively quick and 384painless operation. See exceptions noted below. Please note that we have designed 385this wizard so as to not disturb your existing PhpGedView installation, leaving all those 386settings, data and your website intact and fully functional. 387 388The requirements are: 389 390* The PhpGedView database and index directory must be on the same server as **webtrees**. 391* Your **webtrees** MySQL database username and password must either be the same 392 as your PhpGedView username and password, or if you created a new user for **webtrees**, 393 that new user must also have full privileges to access your PhpGedView database. 394* PhpGedView must be at least versions 4.2.3 or 4.2.4 (this corresponds to an internal 395 “PGV_SCHEMA_VERSION” of between 10 and 14). Newer versions, including the current 396 version 4.3 SVN work (as of JAN 2013) also currently, and later versions, should 397 they be released, will probably work, provided the data structures do not change; 398* All changes in PhpGedView must be accepted (as pending edits will not be transfered). 399* All existing PhpGedView users must have an email address, and it must be unique to that 400 user (PhpGedView allows users to delete their email address, or have the same email 401 address as other users; **webtrees** requires that all users have their own 402 unique email address). 403* The wizard transfer process overwrites the username and password you may have 404 entered in setting up the initial admin account. The main administration user 405 name and password in **webtrees** will be identical to the admin username and 406 password from PhpGedView after running the wizard. Once done, you can change it back 407 if desired. 408 409 410#### Warning 411 412Please read the [https://wiki.webtrees.net/en/Converting_from_PhpGedView](https://wiki.webtrees.net/en/Converting_from_PhpGedView) 413before doing a transfer as important pre-processing steps and known issues may 414be outlined there. 415 416 417#### Important Note 418 419This transfer wizard is not able to assist with moving media items. You will need 420to set up and move or copy your media configuration and objects separately after 421the transfer wizard is finished. If you use the media firewall in PhpGedView with a 422directory outside the PhpGedView root, then duplicating the media configuration in 423**webtrees** to use the same firewall directory should make your media available 424in **webtrees**. 425 426After the transfer is complete, you should check your family tree configuration 427and privacy settings. Due to differences in internal data formats, the following 428settings are not yet transfered: custom privacy restrictions, block configuration, 429FAQs, and HTML blocks. We hope to add these to the wizard in a future release. 430 431 432#### Custom privacy restrictions, block configuration, FAQs and HTML blocks 433 434We hope to add these to the wizard in a future release. Otherwise, read the 435[https://wiki.webtrees.net/en/Converting_from_PhpGedView](https://wiki.webtrees.net/en/Converting_from_PhpGedView) 436before reporting a problem in the forum. 437 438The transfer wizard is accessed in **webtrees** from the bottom of the 439“Manage family trees” page to which you will be automatically directed once you 440have completed the initial **webtrees** installation steps (section 4 above: 441[installation](#installation)). This option is only available on a new, 442empty **webtrees** installation; once you have created a GEDCOM (family tree) 443or added user accounts, it will no longer be available. 444