Upgrade to 6.0 Is this a file update and a database update?

Using these instructions to upgrade from 5.02 to 6.0. Just want to make sure I am doing this correctly. Questions are in bold.

Notes

Need to ensure the downloaded zip file has been unblocked after downloading.

Upgrade

Move current (5.0.2) /openemr directory to a backup directory openemr_bk

Unpackage 6.0.0 openemr into web directory and rename the directory to openemr
This is in a new directory not the backup right?

Copy following directory from old 5.0.2 version to /openemr directory:

openemr_bk/sites/default/documents (COPY TO) => openemr/sites/default/documents

Copy the openemr/sites/default/sqlconf.php file from your old 5.0.2 version into the new openemr version

In the openemr/sites/default/sqlconf.php file, set the $config variable (found near bottom of file within bunch of slashes) to 1 ($config = 1;)

Open openemr/sql_upgrade.php (http://localhost/openemr/sql_upgrade.php) in web browser, choose 5.0.2 and click ‘Upgrade Database’
**Should I change the config file to point to the most current database? I have a backup **

Configure optional settings in openemr/sites/default/config.php files

Download and install most recent patch

After finishing this upgrade to OpenEMR version 6.0.0, it is recommended that you check if there are any patches to apply. If so, install the most recent patch for version 6.0.0. Instruction to do this can be found on the OpenEMR Patches page.

Using OpenEMR

See the OpenEMR 6.0.0 User Guide

Securing OpenEMR

See the Securing OpenEMR Guide

1 Like

So I put the new files in a new directory, Then copy over the documents and the sqlconfig from olddirectory/site/default to newdirectory/site/default.

Then go to newdirectory/sql_upgrade.php

So basically the entire site is new except the docs and config file?
Does the database referenced in the config file get updated also?
To test this can I update a new directory on the same server?

Tammy when you copied the old sites directory over to new v6 directory, config is pointing to your old production DB. So running upgrade upgraded you production(or test DB).

When you rename new v6 directory back to openemr or whatever your domain points to then you’re done and live.
Rename production directory first.

What confuses me is it says copy production to openemr_bu and put the new version files in opener directory.

Okay. Not the way i’d do it but same end. I always do new version in a new directory, test then rename to go live.

You should be live now if you followed those directions.

Thanks. So you are basically putting the new software in a new directory and then renaming it to the old directory to point to your database right?

So the database doesn’t change?

I am sorry but I want to make sure I am getting the process.
I only have one server and 2 directories under public_html so I don’t want to mess anything up.

Right now it doesn’t matter. Where ever you copy sites/default/sqlconf.php from old dir, it points to your current DB. So if you ran sql upgrade after copying sites/default/sqlconf.php then your DB is upgraded.

You should be live if new is in openemr dir along with new v6 code.
Too be honest, I don’t know where you are…

O.k. that explains it then. I ran the sql_upgrade.php but it only ran 95% and stopped. Tried to continue but it froze.

show screenshot or start from v5.0.1
This upgrade takes a long while.

[Sat Jul 03 19:43:03.102070 2021] [proxy_fcgi:error] [pid 44306:tid 47438318536448] (70007)The timeout specified has expired: [client 172.77.119.45:52780] AH01075: Error dispatching request to : (polling), referer:openemr/sql_upgrade.php

that error is out of scope for me. ya need to research and may be something in mysql config but, sql_upgrade won’t timeout.

My server guys are puzzled.
Is it possible to start with a fresh install of 6.0 (not an upgrade) but use the existing database?

Updated the server and resized it and was able to upgrade to 6.0.

1 Like