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