Cannot update Ubuntu 12.04 to 14.04 in DigitalOcean

I recently faced the problem of not being able to update Ubuntu 12.04 to 14.04 in my DigitalOcean droplet.

Despite these great instructions:

It did not work because there were missing files.

I had to manually edit the sources list

sudo nano /etc/apt/sources.list

And uncomment the original DEB package sources, and comment the Digital Ocean mirror packages.

Hope it helps!

Alternatives for a web application architecture

The guys at DigitalOcean have written a great article with the choices you have when designing your webapp insfrastructure needs:

good read!


Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that a host key has just been changed.
The fingerprint for the RSA key sent by the remote host is
Please contact your system administrator.
Add correct host key in /Users/username/.ssh/known_hosts to get rid of this message.
Offending RSA key in /Users/username/.ssh/known_hosts:9
RSA host key for xx.xx.xx.xx has changed and you have requested strict checking.
Host key verification failed.

One reason for this to happen can be that you changed the machine, although it has the same IP address. It happened to me with DigitalOcean.

Solution: Regenerate the key

ssh-keygen -R xx.xx.xx.xx

(note that username and ip address have been replaced by dummy values)

Configure sendmail in Ubuntu 12.04 and make it fast!

I got a server in DigitalOcean and installed WordPress.

To my surprise, sending mail was not something pre-configured so I had to find a way. I did not want to use SMTP solutions but use a simple Unix package such as sendmail or postfix.

It seems that sendmail is simpler, and good enough if you only want to send mails. That is my case, because I just want to receive notifications from WP, such as the ones that contact form 7 sends everytime a form is filled up and sent.

So I looked at tutorials, and the simplest thing to do was

1) If sendmail is not installed, do install it:
apt-get install sendmail
2) Configure hosts file correctly:
nano /etc/hosts
And make sure the line looks like this: localhost localhost.localdomain yourhostnamehere
3) Reload /etc/hosts, so that the previous changes take effect
sudo /etc/init.d/networking restart that works but seems to be deprecated, better use:
/etc/init.d/networking stop
/etc/init.d/networking start

4) Run the sendmail config and answer ‘Y’ to everything:


Thanks to Colling Henderson for the help, which I also found when digging further about the sluggishness of sendmail, in his blog:

It is of utmost importance that you make sure the of point 2 string “localhost.localdomain” is in there. I did not take it seriously the first time I read it, but it does make a big difference. If you don’t change it, the php send function will be sooooo slow.

By the way, I also followed the instructions here: and I am not sure how much changing the line in the is affecting the speed. To me it was the fact that the string “localhost.localdomain” what really made the difference from some 1 minute to 2 seconds!!!!

more performance for your WordPress install

i look forward to installing my next WP blog under nginx

This guide looks a good start:

and this for a Varnish improvement

and if you have a Mac, then you can install locally this set