Alex Moreno

A Drupal Developer in London

Deploying Drupal projects: git + capistrano


removing some folders from git, file .gitignore with these contents:


# Ignore paths that contain generated content.








Using symbolic links for /files directory:



namespace:custom do

    task:symlink do

      run "ln -s /var/www/crucerista/sites/ /var/www/crsta/current/sites/"

      run "echo 'finished'"



after "deploy","custom:symlink"


Optimizing a Drupal database: improving the performance

That is what you have when you don't optimize and maintenance properly your Drupal projects. A 4GB database which hits hugely the server performance. Just a couple of "magic tricks" and .... 194MB.

Magic? Not at all. If you have a problem with your server, with hangs up and things going very sloooow, check the cache. sessions and watchdog tables, and clear them.

It works like a charm :-)

error: unable to create temporary sha1 filename ./objects/17: Permission denied

I have had this issue recently, with a git branch which did not want to to react to push. That's what a was having:

$ git [email protected]'s password Counting objects: 5, done.
Delta compression using up to 2 threads.
ng objects: 100% (3/3), done.
Writing objects: 100% (3/3), 303 bytes, done.
Total 3 (delta 2), reused 0 (delta 0)
error: unable to create temporary sha1 filename ./objects/17: Permission denied
fatal: failed to write object


Drupal maintenance tasks


How important is having a database optimized. Doing some "basic" optimizations like clearing the cache, runing the Drupal cron and a couple of things more, your database can change from having 4 GB to just around 200MB... incredible? Not at all, the importance of maintenance tasks :-)

Which tasks? Mainly: