How to migrate your database from one computer to another with openEmr 7.0.1

Since i don’t know your version of Openemr and the size of your database, try in demo environment and then check if everything is working. And i have to declare i don’t know what Iam talking about :grinning:

1- Just use the Admin>System>Backup>Create backup. Wait till it finishes and sends file to download. This is the database SQL file. Or MySQL Workbench for WampServer.

Now you need to stop all Wamp services and close it in task manager.

2- Backup your existing OpenEMR installation:

  • Locate the OpenEMR project folder on your current PC. By default, it’s installed in C:\wamp64\www\openemr.
  • Make a copy of the entire OpenEMR project folder to a safe location as a backup.
  • Make sure you know the default root password you used first time when creating
    your database because, you will need it.

3- Install WampServer on the new PC:

  • Download and install the same version of WampServer on the new Windows 10 PC on the same hard drive.
  • Ensure that Apache and MySQL services are running.

4- Transfer the OpenEMR project folder:

  • Copy the OpenEMR project folder from your old PC to the appropriate location on the new PC C:\wamp64\www\.

5- Import the OpenEMR database:

  • Access the database management tool (MySQL Workbench) on the new PC.
  • Create a new, empty database for OpenEMR.
  • Import the SQL file that you exported from the old PC’s database into the newly created database on the new PC. (ENSURE YOU IMPORTED ALL TABLES AND NO ERRORS AFTER FINISHING IMPORTING)
    or

6- Update OpenEMR configuration files:

  • Navigate to the OpenEMR project folder on the new PC (the one you copied to www).
  • Look for the sites directory and locate the site_id folder. Inside this folder, you’ll find the database.php file.
  • Open database.php with a text editor and update the database-related configurations (database name, username, password) to match the new database you created in step 5.

7- Start Apache and MySQL:

  • Open WampServer control panel on the new PC.
  • Start the Apache and MySQL services.

8- Access OpenEMR on the new PC:

  • Open a web browser and enter http://localhost/openemr in the address bar, or
    your previous customized link.
  • You should see the login page for your OpenEMR installation.

9- Test the transferred system:

  • Log in to your OpenEMR system on the new PC using the same credentials as on the old PC.
  • Verify that all your medical records and settings are intact and working as expected.

Always take care to back up your data and verify the steps, as any mistakes could lead to data loss or system issues. If you encounter any problems, consult pros around here, me excluded :sweat_smile:

1 Like