8 Web Practices for Drupal


Published on

Published in: Self Improvement
  • Be the first to comment

  • Be the first to like this

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide

8 Web Practices for Drupal

  1. 1. Drupal web practices<br />Wilson Wingston Sharon<br />wingston.sharon@gmail.com<br />
  2. 2. Planning saves time<br />Plan your site. Drupal provides a good toolset to help you build your site but you still need to plan. Good wireframes and proper planning can avoid significant misunderstandings and problems later. <br />Plan for the future. You should revisit and reevaluate your site each time there is a major version release of Drupal. This does not mean you have to upgrade it, but you should evaluate and plan for an upgrade approximately each 12-24 months. <br />
  3. 3. Maintenance <br />Get involved in the community. This will help you follow development trends and, while helping others, you may just come across a cool idea that solves your own problem. <br />Back up your site. Back up both the database and the files on the web server. Test your backups! If you don't test them, you have no idea if you are doing it right. <br />Test your PHP snippets. Drupal gives you a great deal of power and flexibility when using PHP code in blocks. Unfortunately, a stray character or a missing semi-colon breaks PHP. Drupal then attempts to evaluate this broken code on any requested page, the PHP interpreter chokes on it and therefore your whole site is broken<br />
  4. 4. Maintainance<br />Set up a test site using your live data. You do not want to have to ask in the forums how to save your site. <br />Never do development or testing on your live production site. Drupal is fast and easy to install. Always test on a test site first.<br />Test that your backups work and that you know how to do a restore of your site. The test system can be your local desktop.. <br />
  5. 5. Maintainance<br />You do not want to discover the hard way that you forgot a file or did not know how to do this when your site is down.<br />Test your site upgrade procedure before risking your live site and document the steps you take. 2 am upgrades on a whim always lead to disaster.<br />
  6. 6. More mngmt<br />Modules that are not part of core may or may not be supported by their contributor for a Drupal version upgrade. Check if all your modules have upgrades before moving drupal core.<br /> Rename or remove update.php from the root of your Drupal directory unless you are actually updating your site. There are protections for it in the update script, but why take a chance.<br />
  7. 7. Accounts and roles<br />Do not use the first user account for day to day stuff on your site. This account should be used for the site setup, major configuration changes and upgrades only.<br />Set up some appropriate roles (do not forget to update these roles as you add new modules). <br />Some role suggestions are 'site admin', 'user admin', 'site contributor'. What roles you need to create will depend on the type of site you have designed.<br /> Note that anyone who can administer users can grant themselves additional permissions. <br />
  8. 8. Updating drupal<br />Read update.txt – comprehensive information about how to upgrade.<br />Put site into maintenance mode.<br />Back up site and settings.php<br />Disable all contrib modules.<br />Upload new drupal core files.<br />Run update.php<br />Enable all modules.<br />Run update.php again.<br />
  9. 9. cron<br />www.mysite.com/cron.php is the cron task scheduler that runs unobtrusive drupal maintenance tasks.<br />Use curl,lynx,wget to set up cron. <br />Server os dependant so see documentation of your hosting provider to see that cron runs at least once a week.<br />
  10. 10. Going live<br />Domain hosting services include<br />Domain naming registration <br />Server space<br />Mail id <br />Site administration tasks<br />Google for a good hosting provider before buying space.<br />
  11. 11. Search engine optimization<br />Categories content properly.<br />Maintain a robots.txt<br />Use nodewords module to manage meta tags for your site.<br />Publicize. Be patient google will find you.<br />
  12. 12. In conclusion<br />Webmastering need not be a daunting task.<br />Don’t be scared of asking around in forums.<br />Read “readme.txt” – usually very helpful.<br />Google any problem you have with drupal.<br />