Drupal is an open source Content Management System (CMS) platform maintained and developed by a community of thousands of users and developers. This article contains tips for Drupal development using the Drupal content management system/framework. This article gives a list of what to check in a drupal 7 website and how to control and automate it. This checklist is to be checked each time you keep integrating new stuff during deployment to test if everything is still working. This task can be automated to save time.
Intro
During development a lot of settings are turned off or are configured differently. It’s because different environments might use different services and for some settings it is more convenient to develop with certain configuration.
Settings to be Checked
Normally when using a local – development – test – live workflow, most of the local settings and development settings should be the same and also most of test and live settings should be same. Since the client first checks the test version before going live the two environments should be the same except for the environment specific settings of course.
The easiest way to control settings is to keep a settings file per environment. In this settings file it is possible to set your environment specific settings. So turn off error reporting, turn on preprocessing of css and js, enable page cache and enable block cache. These are some of the typical go live settings.
A characteristic site has some other environment specific settings depending on the functionality enabled. So one these live settings are kept in the settings file.
Now we have a site with a solr and have a different instance for all of our environments so we can fill in the settings here, we can do the same for our other environment dependent settings like the maps api key etc.
In case you want to enable error reporting on the test. Some errors manifest its self and you are not able to check it because you cannot change the setting. What this means is that this setting should not be configured the hard way in settings.php.
Shell Script
Creating a shell script and executing it each time you deploy, will live in your version control system so you actually keep track of your go live list.
An example of such a script can be:
To use it create a file called update_live.sh. Make it executable chmod u+x update_live.sh and execute it ./update_live.sh
Here, drush (http://drupal.org/project/drush) is to be installed on the web server.
A CI server like Jenkins (http://jenkins-ci.org/) can be used to automate this task. Each environment has its own script so you can actually control how your site is deployed to each environment.
Automate the Testing
The next step that Drupal developers can take up is to automate the testing if everything is setup by running tests. Using the simple test module during deployment can verify a lot of things. Generally it is not recommended to run tests against a live instance. But if you know what you are doing it can help you verify all your settings during deployment. Know what you are doing means:
- Make sure your tests don’t cause any performance issues.
- Make sure you cleanup everything your tests are doing.
Only test environment dependent functionality. All the other functionality you can test when deploying to dev – test
Make sure you disable the simple test module when done.
Some settings are indeed hard to check using simple test, so this requires the use of some additional tools to monitor other parts of your infrastructure.
Checklist
Complete checklists to be checked when going live are:
Performance
- Set Page cache.
- Set Block cache.
- Set Page compression.
- Set Error level
- Install PHP accelerator like APC etc.
Disable some core and contrib modules, for example update, syslog, dblog, field_ui, devel, views_ui etc. Logs and stats should be disabled you can use other tools on the server to monitor errors in a more performing way.
Security
- Improve Drupal development and the Contirb module to the Latest Version.
- Schedule back up of database.
- Protect Admin password.
- Enable Google Analytics.
- Use captcha or mollom for all forms.
- Double check user registration settings.
- Double check all permissions.
- Check the watchdog for errors and warnings, and fix these
- Check input format.
SEO
Drupal developers can use the Drupal SEO checklist to make sure everything is enabled as it should be. You can also check all settings using a script.
- Site SMTP settings
- Contact module settings, web form or others that require email.
Test content
Keep a list of test nodes, when you build your site.
Conclusion
Set everything environment specific that doesn’t require an occasional change in settings.php. Set the other environment specific settings by a shell script each deploys.
Keeping both the script and different settings.php files ensure you can keep track of your go live requirements. Use a go live simple test to check if everything is working as it should be.
For more info Call Toll Free: +1-855-SYNAPSE or Contact Us at info@synapseindia.com








Comments are closed.