Difference between revisions of "OpenEMR Multiple Sites Module"
From OpenEMR Project Wiki
Bradymiller (talk | contribs) (Created page with "==Overview== Very cool module that allows creation of Multiple OpenEMR installations from one codebase footprint (note that each OpenEMR installation does have it's own MySQL dat...") |
m (Copyedit) |
||
(47 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
The Multi site module allows creation of Multiple OpenEMR installations from one codebase footprint. The instance-specific files are stored in the openemr/sites/<installation-name> directory. So, for example, the 'default' installation specific files can be found at openemr/sites/default. Note that each OpenEMR installation does have its own MySQL database. | |||
==Installation of a new site== | |||
:These instructions assume you have already installed OpenEMR (the 'default' site). | |||
:*Note you will need to assign read/write permissions to the <code>openemr/sites</code> directory for your web server | |||
:*Also note your web server will need permission to view the following files (in many installations, access to these files is restricted for security purposes): | |||
::*<code>admin.php</code> | |||
::*<code>setup.php</code> | |||
::*Also note you need to do a couple things in the <code>setup.php</code> script to build your multisites (you should revert these changes right after you are done for security purposes; or it's even better to delete the <code>setup.php</code> script completely when you are done building your multisites): | |||
:::*Set the <code>$allow_multisite_setup</code> to <code>true</code> | |||
:::*Set <code>$allow_cloning_setup</code> to <code>true</code> if you intend to clone a site) | |||
::*To avoid permission checking across your new site files and folders which could take lots of time, you can set <code>$checkPermissions</code> in <code>setup.php</code> to false | |||
:*Go to <nowiki>https://<your_server_name_or_IP_address>/openemr/admin.php</nowiki> | |||
:*Select 'Add New Site' | |||
:*Go through the setup step, the same as for a new installation. | |||
::*At Step 2, note the two additional options: | |||
:::*Source site (pick a site to copy the configuration files from) | |||
:::*Clone Source Database (if want to clone the database of a already existent site) | |||
==Upgrading== | |||
:*If only upgrading the 'default' site, then just follow the [[OpenEMR_Upgrade_Guides| standard OpenEMR upgrading instructions]] for your operating system. | |||
:*If also upgrading other sites, then do the following: | |||
::*Move all directories for each site | |||
:::*<code>openemr/sites/<site_id>/documents</code> | |||
:::*<code>openemr/sites/<site_id>/edi</code> | |||
:::*<code>openemr/sites/<site_id>/era</code> | |||
:::*<code>openemr/sites/<site_id>/letter_templates</code> | |||
::*Configure the <code>openemr/sites/<site_id>/sqlconf.php</code> file for each site | |||
:::*Copy variables from the old <code>sqlconf.php</code> to the new one | |||
:::*Set the <code>$config</code> variable to <code>$config=1;</code> | |||
::*Open <code>admin.php</code> in a web browser (<nowiki>http://<server_name>/openemr/admin.php</nowiki>), note see above for <code>admin.php</code> security | |||
:::*If displayed, select 'Upgrade Database' for each site (and follow instructions) | |||
::*Update the ACL access controls for each site: | |||
:::*<nowiki>http://<server_name>/openemr/acl_upgrade.php?site=<site_id></nowiki> | |||
Backup and restore has some new and interesting behavior. Each site is still backed up individually, and the backup script is careful to omit the site-specific directories of other sites. The restore script has a new option to specify the site ID being restored, and when the target OpenEMR directory already exists it will preserve that directory and restore only the site-specific subdirectory. Note there is no feature at this time to back up multiple sites at once. | ==Patches== | ||
:*If only installing the patch for the 'default' site, then just follow the [[OpenEMR_Patches| standard OpenEMR patch installation instructions]] for your operating system. | |||
:*If also upgrading other sites, then in addition to above, also do the following: | |||
::*Open admin.php in a web browser (<nowiki>http://<server_name>/openemr/admin.php</nowiki>) | |||
:::*If displayed, select 'Patch Database' for each site | |||
==Backup/Restore== | |||
:Backup and restore has some new and interesting behavior. Each site is still backed up individually, and the backup script is careful to omit the site-specific directories of other sites. The restore script has a new option to specify the site ID being restored, and when the target OpenEMR directory already exists it will preserve that directory and restore only the site-specific subdirectory. Note there is no feature at this time to back up multiple sites at once. | |||
[[Category:User Guide 4.2.0]][[Category:User Guide 4.1.2]][[Category:User Guide 4.1.1]][[Category:User Guide 4.1.0]][[Category:User Guide]][[Category:Configuration Guide]][[Category:Installation]][[Category:Upgrade]][[Category:Patch]][[Category:Backup]] |
Latest revision as of 16:25, 29 November 2024
The Multi site module allows creation of Multiple OpenEMR installations from one codebase footprint. The instance-specific files are stored in the openemr/sites/<installation-name> directory. So, for example, the 'default' installation specific files can be found at openemr/sites/default. Note that each OpenEMR installation does have its own MySQL database.
Installation of a new site
- These instructions assume you have already installed OpenEMR (the 'default' site).
- Note you will need to assign read/write permissions to the
openemr/sites
directory for your web server - Also note your web server will need permission to view the following files (in many installations, access to these files is restricted for security purposes):
admin.php
setup.php
- Also note you need to do a couple things in the
setup.php
script to build your multisites (you should revert these changes right after you are done for security purposes; or it's even better to delete thesetup.php
script completely when you are done building your multisites):
- Set the
$allow_multisite_setup
totrue
- Set
$allow_cloning_setup
totrue
if you intend to clone a site)
- Set the
- To avoid permission checking across your new site files and folders which could take lots of time, you can set
$checkPermissions
insetup.php
to false
- Go to https://<your_server_name_or_IP_address>/openemr/admin.php
- Select 'Add New Site'
- Go through the setup step, the same as for a new installation.
- At Step 2, note the two additional options:
- Source site (pick a site to copy the configuration files from)
- Clone Source Database (if want to clone the database of a already existent site)
- Note you will need to assign read/write permissions to the
Upgrading
- If only upgrading the 'default' site, then just follow the standard OpenEMR upgrading instructions for your operating system.
- If also upgrading other sites, then do the following:
- Move all directories for each site
openemr/sites/<site_id>/documents
openemr/sites/<site_id>/edi
openemr/sites/<site_id>/era
openemr/sites/<site_id>/letter_templates
- Configure the
openemr/sites/<site_id>/sqlconf.php
file for each site
- Copy variables from the old
sqlconf.php
to the new one - Set the
$config
variable to$config=1;
- Copy variables from the old
- Open
admin.php
in a web browser (http://<server_name>/openemr/admin.php), note see above foradmin.php
security
- If displayed, select 'Upgrade Database' for each site (and follow instructions)
- Update the ACL access controls for each site:
- http://<server_name>/openemr/acl_upgrade.php?site=<site_id>
Patches
- If only installing the patch for the 'default' site, then just follow the standard OpenEMR patch installation instructions for your operating system.
- If also upgrading other sites, then in addition to above, also do the following:
- Open admin.php in a web browser (http://<server_name>/openemr/admin.php)
- If displayed, select 'Patch Database' for each site
Backup/Restore
- Backup and restore has some new and interesting behavior. Each site is still backed up individually, and the backup script is careful to omit the site-specific directories of other sites. The restore script has a new option to specify the site ID being restored, and when the target OpenEMR directory already exists it will preserve that directory and restore only the site-specific subdirectory. Note there is no feature at this time to back up multiple sites at once.