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