Add new comment
In the previous articles in this series, we've focused on aspects of architecture, security and performance and the choice of infrastructure. All of that work will come to little without a reliable maintenance plan. It's likely that even soon after you launch, critical improvements will need to be made, and new features added as you gain insight from usage in the wild. The process is cyclical.
The life cycle of a website begins from initial plans and extends to the end of the site. The site exists in three different phases: development, deployment, and maintenance. After the site is launched, your website lifecycle practices become critical to the success of changing and maintaining your site.
- Keep your code under version control.
- Maintain separate environments for the different stages of the site, and keep them up to date.
- Restrict access to the production site for all but the most trusted users.
- Review all logs periodically, including Apache, Drupal, and MySQL.
- Review and assess your architecture periodically, and plan for the future.
Reliable collaboration through version control
- Mistake: Not using a version control system (VCS).
- Example: Copying code occasionally to backup folders as a method of version control.
- Solution: Use a version control system. Git is the most popular among Drupal developers, but any modern system is better than none is fine if used. Be sure you leave meaningful commit messages so that colleagues can understand the changes you have made.
- Mistake: Keeping extraneous file in the VSC repository.
- Example: Image asset files, holiday pictures, or database dumps pushed to the repository.
- Solution: Keep the VCS as clean and small as possible.
Deploy with version control
- Mistake: Uploading files to production through FTP.
- Solution: Deployment must come directly from the VCS repository.
Security during deployment
- Mistake: Production environment not properly secured.
- Example: Any developer can take a snapshot of production to install on their laptop.
- Solution: Allow developers to take snapshots and have other access to development and staging environments, but allow access to the production environment only for the most trusted users.
Test on environments as similar to production as possible
- Mistake: Development and staging environments out-of-date or missing functionality.
- Example: Testing only in production because the other environments have old data or no connection to an external service.
- Solution: Maintain testing environments as similar to production as possible. With these, you can easily copy from production and execute tests to assure that changes will work when moved to production.
Keep your site up to date
- Mistake: Sites using out-of-date code for core and contributed modules.
- Solution: Keep all modules and core as current as possible.
Remember that a website is a living organism. Regularly check all logs so that you’ll know where it is going. As it changes over time, you may find new ways to improve and protect it. Schedule periodic reassessment of each aspect of your site.
Keeping a large Drupal website going is a challenge on many fronts. If you follow these best practices and avoid the mistakes outlined here, you’ll find your work goes much better. You’ll keep your website functioning smoothly and your stakeholders happy.
Read more about maintenance, version control and security on Acquia's Library!
Photo Monarch Life Cycle, in a series by Sid Mosdell (CC BY 2.0)