- Posts: 58
Question
Upgrading 1.7.14 to current..
- tthdoc
-
Topic Author
- Offline
- New Member
-
Less
More
6 months 3 weeks ago #114731
by tthdoc
Upgrading 1.7.14 to current.. was created by tthdoc
I think I am ready to take the plunge to upgrade. Years ago I did many modifications to my current site formatting (1.7.14) in both colors, CSS, etc. Because of this, I don't want to just do an upgrade and have everything now look different. So I want to do the following approach and would like some guidance. For clarity, I use BlueHost. Let's call the folder I use as TreeSite and I access it through TreeSite.com. As a side note, I don't have many users making changes to the site, so the database is not a worry, and if I get a few changes during the process, I can always add them manually. Here is what I want to do. First, make a duplicate site (my sandbox, so to speak) and database and let's call it UpgradeTreeSite. Go through the process needed to upgrade this to the current version (I realize this would be multiple steps). Then I would make all my modifications, adjustments, etc, until it looks the way I like it. Then I would rename TreeSite folder to OldTreeSite and rename the UpgradeTreeSite folder to TreeSite. In addition, I need to know how to proceed with the PHP version changes. Currently TreeSite is using version 7.3. Do I need to keep upgrading the PHP version with each upgrade iteration, or just go from A->Z, and then upgrade 7.3 to 8.3? Thanks for any guidance.
Doc
Doc
Please Log in or Create an account to join the conversation.
- bertkoor
-
- Offline
- Platinum Member
-
- Greetings from Utrecht, Holland
6 months 3 weeks ago - 6 months 3 weeks ago #114732
by bertkoor
stamboom.BertKoor.nl runs on webtrees v2.2.6
Replied by bertkoor on topic Upgrading 1.7.14 to current..
You cannot run a 1.7 and 2.x version on the same server if these share the same PHP version. Check the table here:
webtrees.net/install/requirements/
Many things have changed, both from 1.7 to 2.0 as from 2.0 to 2.1. In essence only the database and data folder remain in tact. The folder structure was simplified, root folder cleaned up. I'd advice to remove all the old scripts. Likely a lot of the CSS classes have been renamed.
If you can then run webtrees local, on your own computer, so testing is fast and easy. You can use webtrees 2.1 for this, it is very similar to 2.2 but can run with PHP7.4. Also an option is to locally run the 'docker' version of Nathan Vaughn.
I don't know what/how you changed CSS. First make an inventory of the changes, and what you think is most important. Maybe decide some things can stay as is, and you just need to get used to it. Especially edit forms have a different styling now.
On the current version there are two methods for customization:
1. Use the CSS & JS core module. Your CSS changes are stored in the database, safe for future upgrades.
2. Create a custom theme, which can be based on a core theme. You'll need this for sure if you have custom translations.
Example:
github.com/webtrees/example-module-theme
Questions? Just ask...
webtrees.net/install/requirements/
Many things have changed, both from 1.7 to 2.0 as from 2.0 to 2.1. In essence only the database and data folder remain in tact. The folder structure was simplified, root folder cleaned up. I'd advice to remove all the old scripts. Likely a lot of the CSS classes have been renamed.
If you can then run webtrees local, on your own computer, so testing is fast and easy. You can use webtrees 2.1 for this, it is very similar to 2.2 but can run with PHP7.4. Also an option is to locally run the 'docker' version of Nathan Vaughn.
I don't know what/how you changed CSS. First make an inventory of the changes, and what you think is most important. Maybe decide some things can stay as is, and you just need to get used to it. Especially edit forms have a different styling now.
On the current version there are two methods for customization:
1. Use the CSS & JS core module. Your CSS changes are stored in the database, safe for future upgrades.
2. Create a custom theme, which can be based on a core theme. You'll need this for sure if you have custom translations.
Example:
github.com/webtrees/example-module-theme
Questions? Just ask...
stamboom.BertKoor.nl runs on webtrees v2.2.6
Last edit: 6 months 3 weeks ago by bertkoor.
Please Log in or Create an account to join the conversation.
- tthdoc
-
Topic Author
- Offline
- New Member
-
Less
More
- Posts: 58
6 months 3 weeks ago #114733
by tthdoc
Replied by tthdoc on topic Upgrading 1.7.14 to current..
Bluehost as a multiPHP Manager, which allows you to have different PHP versions for different domains.
So by what you said, it sounds like the database and data folders remain intact. So can I just create a new folder, install the latest version, and then copy the data folder from the existing website folder and change the config to the existing database. And if yes, does that mean I can still change data on the existing website, and it will be reflected in the new current version?
So by what you said, it sounds like the database and data folders remain intact. So can I just create a new folder, install the latest version, and then copy the data folder from the existing website folder and change the config to the existing database. And if yes, does that mean I can still change data on the existing website, and it will be reflected in the new current version?
Please Log in or Create an account to join the conversation.
- bertkoor
-
- Offline
- Platinum Member
-
- Greetings from Utrecht, Holland
6 months 3 weeks ago #114735
by bertkoor
stamboom.BertKoor.nl runs on webtrees v2.2.6
Replied by bertkoor on topic Upgrading 1.7.14 to current..
Not much has changed on the database structure. On my develop environment I had a database created by webtrees 2.2, and switched the scripts back to 1.7.20. That seemed to work, but that was only a superficial test.
First make a backup of the database, for security.
First make a backup of the database, for security.
stamboom.BertKoor.nl runs on webtrees v2.2.6
Please Log in or Create an account to join the conversation.
- tthdoc
-
Topic Author
- Offline
- New Member
-
Less
More
- Posts: 58
6 months 3 weeks ago #114738
by tthdoc
Replied by tthdoc on topic Upgrading 1.7.14 to current..
So to clarify, what I said will work? Meaning leave my current site intact, create a new working folder, put a fresh copy of V 2.2, replace the data folder with a copy from 1.7.14, point the config file to the database from 1.7.14, and the new version should work fine, at which point I can make all of my modifications? (of course I will back up my database just in case).
Please Log in or Create an account to join the conversation.
- bertkoor
-
- Offline
- Platinum Member
-
- Greetings from Utrecht, Holland
6 months 3 weeks ago - 6 months 3 weeks ago #114740
by bertkoor
stamboom.BertKoor.nl runs on webtrees v2.2.6
Replied by bertkoor on topic Upgrading 1.7.14 to current..
I cannot guarantee, but imho that should indeed work.
stamboom.BertKoor.nl runs on webtrees v2.2.6
Last edit: 6 months 3 weeks ago by bertkoor.
Please Log in or Create an account to join the conversation.
- Sir Peter
-
- Offline
- Premium Member
-
Less
More
- Posts: 536
6 months 3 weeks ago #114745
by Sir Peter
Peter
Replied by Sir Peter on topic Upgrading 1.7.14 to current..
You will have to create a second database as well! If you connect webtrees 2.x to the old database you will NOT be able to run webtrees 1.7 with the upgraded database any longer.
Peter
Please Log in or Create an account to join the conversation.
- bertkoor
-
- Offline
- Platinum Member
-
- Greetings from Utrecht, Holland
6 months 3 weeks ago - 6 months 3 weeks ago #114748
by bertkoor
I can confirm, this is correct. Sorry, I tried it again, and it failed.
A database upgraded to 2.0 can not be used by webtrees 1.7, or you will get this error:
Some tables which in v1.7 could become very large are not used in 2.x and the upgrade deletes them.
After checking my notes I had only studied the 1.7 branch, but have done tests rolled back to v2.0.x.
What you can do, is specify a different table name prefix (default is 'wt_') to keep it separated.
Or do a full SQL dump and import that into a new DB schema (not adviced for novices)
When I'm doing tests then the actual database content is not so important, as long as something is there.
You can import an exported GEDCOM file for that, or use the `demo.ged` from here:
github.com/fisharebest/webtrees/tree/main/tests/data
stamboom.BertKoor.nl runs on webtrees v2.2.6
Replied by bertkoor on topic Upgrading 1.7.14 to current..
You will have to create a second database as well! If you connect webtrees 2.x to the old database you will NOT be able to run webtrees 1.7 with the upgraded database any longer.
I can confirm, this is correct. Sorry, I tried it again, and it failed.
A database upgraded to 2.0 can not be used by webtrees 1.7, or you will get this error:
Code:
[…]/app/Statement.php:85 SQLSTATE[42S02]: Base table or view not found:
1146 Table 'webtrees.wt_site_access_rule' doesn't exist
#0 /app/Statement.php:85 PDOException("SQLSTATE[42S02]: Base table or view not found:
1146 Table 'webtrees.wt_site_access_rule' doesn't exist")
#1 /includes/session.php:315 execute([array])
#2 /index.php:31 require('[…]/webtrees/…')
After checking my notes I had only studied the 1.7 branch, but have done tests rolled back to v2.0.x.
What you can do, is specify a different table name prefix (default is 'wt_') to keep it separated.
Or do a full SQL dump and import that into a new DB schema (not adviced for novices)
When I'm doing tests then the actual database content is not so important, as long as something is there.
You can import an exported GEDCOM file for that, or use the `demo.ged` from here:
github.com/fisharebest/webtrees/tree/main/tests/data
stamboom.BertKoor.nl runs on webtrees v2.2.6
Last edit: 6 months 3 weeks ago by bertkoor.
Please Log in or Create an account to join the conversation.
- fisharebest
-
- Offline
- Administrator
-
6 months 3 weeks ago #114765
by fisharebest
Greg Roach - greg@subaqua.co.uk - @fisharebest@phpc.social - fisharebest.webtrees.net
Replied by fisharebest on topic Upgrading 1.7.14 to current..
Are you able to configure your server to use different versions of PHP on different sites?
If yes, then duplicate your database and run both sites together. Make sure you read webtrees.net/upgrade/2.0/ first.
But if you have to run the same version of PHP for all your sites, then you need to look at this chart:
webtrees.net/install/requirements/
As you can see, webtrees 1.7 needs PHP 7.3 or lower, which means you can only run webtrees 2.0 in your "new" site.
There is one caveat to this. If I remember correctly, webtrees 1.7 does not run with PHP 7.4, because it causes some subtle bugs that result in data loss/corruption when you edit genealoyg data. If your 1.7 site is read-only, then you can run it with PHP 7.4. This means your "new" site can be webtrees 2.1 - which is pretty similar, internally to 2.2.
If yes, then duplicate your database and run both sites together. Make sure you read webtrees.net/upgrade/2.0/ first.
But if you have to run the same version of PHP for all your sites, then you need to look at this chart:
webtrees.net/install/requirements/
As you can see, webtrees 1.7 needs PHP 7.3 or lower, which means you can only run webtrees 2.0 in your "new" site.
There is one caveat to this. If I remember correctly, webtrees 1.7 does not run with PHP 7.4, because it causes some subtle bugs that result in data loss/corruption when you edit genealoyg data. If your 1.7 site is read-only, then you can run it with PHP 7.4. This means your "new" site can be webtrees 2.1 - which is pretty similar, internally to 2.2.
Greg Roach - greg@subaqua.co.uk - @fisharebest@phpc.social - fisharebest.webtrees.net
Please Log in or Create an account to join the conversation.
- tthdoc
-
Topic Author
- Offline
- New Member
-
Less
More
- Posts: 58
5 days 5 hours ago #116988
by tthdoc
Replied by tthdoc on topic Upgrading 1.7.14 to current..
I am revisiting this thread as I am ready to start making changes. So I want to check my plan:
1. I will leave my existing site intact and running as usual.
2. I will create a new folder Familytree2.
3. Download latest version (2.2.6 as of today) and extract files to new folder.
4. Goto MySQL Wizard and create a new empty database (tree2 for example)
5. Run setup and point to new database and create new master admin acct.
6. copy images from data/media folder of 1.7 install to the new install
7. Export GEDCOM from 1.7 and import into 2.2
8. Now I should have 2 identical family trees which I can now play with and customize any way I want until it is how I like it.
9. When done, I can just do one final transfer of media in case anything changed, same with GEDCOM, then make the new site live and retire the old.
The only thing I know I missed so could use guidance is the users. I want to maintain them as well obviously.
Let me know if this plan works, or if I am missing anything or any nuances overlooked (I'm sure I missed something:)).
Thanks,
Doc
1. I will leave my existing site intact and running as usual.
2. I will create a new folder Familytree2.
3. Download latest version (2.2.6 as of today) and extract files to new folder.
4. Goto MySQL Wizard and create a new empty database (tree2 for example)
5. Run setup and point to new database and create new master admin acct.
6. copy images from data/media folder of 1.7 install to the new install
7. Export GEDCOM from 1.7 and import into 2.2
8. Now I should have 2 identical family trees which I can now play with and customize any way I want until it is how I like it.
9. When done, I can just do one final transfer of media in case anything changed, same with GEDCOM, then make the new site live and retire the old.
The only thing I know I missed so could use guidance is the users. I want to maintain them as well obviously.
Let me know if this plan works, or if I am missing anything or any nuances overlooked (I'm sure I missed something:)).
Thanks,
Doc
Please Log in or Create an account to join the conversation.