Roomify for Accommodations - Self-Hosted¶
Installing a self-hosted Roomify for Accommodations site is very simple.
Keep in mind that Roomify for Accommodations is a pre-configured Drupal site. You may download a packaged zip file from the releases page.
Here is what you need to do.
- Unzip the file provided.
- Place that file in the appropriate location in either your local development environment or your webserver.
- Configure your web server to point to that location.
- Import the included .sql file to your MySQL or MariaDB installation.
- Edit the existing sites/default/settings.php file and adjust database settings to point to the database you imported in Step 4.
Subdirectory Installations If your RfA installation will be placed in a subfolder of your server, (i.e. http://your.server/folder/RfA/) you must set the $base_url variable to your site’s URL (without a trailing “/”) in settings.php.
- Set the appropriate permissions for the files directory (Here is an excellent guide.)
- Ensure that the PHP memory limit (the memory_limit setting in your web server’s php.ini file) is at least 160M.
- Ensure you are using at least PHP5.4 although PHP7.0 is preferred.
In order to login to the Drupal site you can reset the password using Drush or login with:
user: admin pass: admin
Please change your password immediately!
Keep in mind this is just like setting up any Drupal site. The only difference that you don’t need to go through the installation process of Drupal itself. The database we provide is preconfigured. Our packaging tool makes a clean installation of Roomify for Accommodations and adds the exported database to the package.
We provide updates to Roomify for Accommodations on a regular basis - just go to the releases page to download the latest release.
Instructions given here are generalized, and must be adapted to your particular situation and deployment process.
Always make a full backup of your entire codebase, files and database before installing updated code!!!
If you have not customized any code or functionality (e.g. modifying views or other functionality exported to the roomify features) and your files directory and settings.php file are in the default location (sites/default), the process is simple:
- Move your entire codebase to a backup location outside the web server’s document root.
- Do not import the included .sql file.
- Unzip the new file you have updated into your web server’s document root.
- Remove the new sites/default directory and copy the sites/default directory from the older installation.
- Run database updates.
- Revert all features - the quickest way to do this is to use drush and use the command features-revert-all. You may find more information on reverting features here.
- Clear all caches - it’s possible that all features may not fully revert until you have cleared caches and reverted features twice or three times. This is known behavior with Drupal and not particular to Roomify for Accommodations.
- If any settings that you have modified are reverted by following this process, you should restore your database backup and manually revert features, only reverting functionality that you have not modified. Please see the section on customization for more information.
NB: It is best not to skip versions of Roomify for Accommodations; for example, by updating directly from version 1.0.6 to 1.0.9. It may work, but we only test updating one version at a time and therefore recommend that you follow this practice.
Customizing Roomify for Accommodations¶
When making customizations, your goal should be to avoid directly modifying source code and settings/configurations provided by Roomify for Accommodations. This will make the process of installing updates far easier and avoid having to manually re-integrate any changes you make. Here are a few specific recommendations:
- Place any custom modules you create or download under sites/default/modules - This will allow you to follow the update process provided above without any additions or modifications.
- Use hooks in a custom module wherever possible to modify functionality.
- The Features Override module may be useful to customize functionality provided by Roomify features.
- If you wish to customize the Roomify-provided permissions for roles on the site, you will need to disable the Roomify Rights module. This module enforces correct permissions for Roomify functionality, so as a result, you will need to track permission changes manually. The simplest way to do this is to keep your site in version control and look for changes to invocations of hook_roomify_rights after installing an update.