This Help forum is for issues relates to the latest release (1.7.10/11/12). For issues related to development versions please use their own Help forum.
Before asking for help please read "How to request help" by clicking on that tab above here."

TOPIC: [SOLVED] Easiest way to reinstall using existing database?

Easiest way to reinstall using existing database? 2 months 2 weeks ago #1

  • JohnDBush
  • JohnDBush's Avatar
  • Offline
  • New
  • Posts: 4
Hi,

I want to do a clean reinstallation of Webtrees, using an existing already populated database from 1.7.11. (If you noticed my earlier post, I learned that I was plagued by "vendor buildup" :-) so I just want to start anew with a self-managed instance of the app.)

I created an empty directory on the webserver and uploaded nice fresh clean version 1.7.12 into it.

Then I ran the setup.php wizard, and it didn't provide an option to import my database. Instead, it accepted the parameters for database name, user, and password, but then it wanted me to provide the name of my GEDCOM file. So, I STOPPED THERE. I don't want to take an old GEDCOM file and dump it backwards into the database, which already contained a full set of data. If I want a GEDCOM file, I can export one later as a backup.

I know that I am probably missing something really simple. Should I just skip running "setup.php" and just manually create a config.inc.php file before cranking up webtrees for the first time? I know I could try it myself without asking the question, but it would be nice to get confirmation that it's the correct approach. (because many times in the past, I've done things that "seem to work" but much later blow up in my face! :-) )

THANKS in advance!

-John

correction: of course I meant config."ini".php above.
Last Edit: 2 months 2 weeks ago by JohnDBush. Reason: errata
The administrator has disabled public write access.

Easiest way to reinstall using existing database? 2 months 2 weeks ago #2

  • fisharebest
  • fisharebest's Avatar
  • Offline
  • Administrator
  • Posts: 10909
> Then I ran the setup.php wizard, and it didn't provide an option to import my database

No, but if you simply provide the details of your existing database, it will just start using it.

> Should I just skip running "setup.php" and just manually create a config.inc.php file before cranking up webtrees for the first time?

That's the best approach. Copy the /data/ folder from your old to your new installation.

Or, just delete everything except your data folder and install webtrees over the top.

webtrees will find the database conncection information in data/config.ini.php and start using it.
Greg Roach - This email address is being protected from spambots. You need JavaScript enabled to view it. - fisharebest.webtrees.net
The administrator has disabled public write access.

Easiest way to reinstall using existing database? 2 months 2 weeks ago #3

  • bertkoor
  • bertkoor's Avatar
  • Offline
  • Gold
  • Greetings from Utrecht, Holland
  • Posts: 1524
Copy the database settings from your old config and it all should be fine. Apart from all your media files, you need to copy those.

But to be honest you made it yourself a bit difficult. Outside of the data folder with your data it's all provided in the distribution zip. With WinScp you could just purge the subfolders and replace it's content.
stamboom.BertKoor.nl runs on webtrees v1.7.9
The administrator has disabled public write access.

[SOLVED] Easiest way to reinstall using existing database? 2 months 2 weeks ago #4

  • JohnDBush
  • JohnDBush's Avatar
  • Offline
  • New
  • Posts: 4
Problem solved.

Thank you Greg and Bert! I simply copied config.ini.php from the old installation and updated the parameters to match the database. It worked perfectly.

Also, Kudos to the developers for designing the database to allow transportability without having to edit dependencies within the tables ! (which is unlike Wordpress that's a nightmare to migrate)

John
Last Edit: 2 months 2 weeks ago by JohnDBush. Reason: thanks
The administrator has disabled public write access.

[SOLVED] Easiest way to reinstall using existing database? 2 months 2 weeks ago #5

  • JohnDBush
  • JohnDBush's Avatar
  • Offline
  • New
  • Posts: 4
FYI -- [Aside] -- Adding this "tidbit" of information:

When performing manual updates like this, make absolutely certain that the .htaccess file in the data subdirectory is preserved! The reason I mention this is that .htaccess is a "hidden" file, and easy to overlook when updating the contents of a directory.

It must contain the following two lines of text:

order allow,deny
deny from all


This is extremely important to prevent malicious hackers from accessing your database password.

Also never use the same password for the database and the Admin user login.

-John
The administrator has disabled public write access.
Powered by Kunena Forum