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