title: Error establishing a database connection - Ubuntu WordPress on 14.04
body: <p>Today I have started to see in my website this message <strong>"Error establishing a database connection"</strong>, so I was investigating and I saw this <a href="https://www.digitalocean.com/community/tutorials/how-to-protect-wordpress-from-xml-rpc-attacks-on-ubuntu-14-04?utm_medium=social&amp;utm_source=twitter&amp;utm_campaign=wordpress_ubuntu_tut&amp;utm_content=no_image" rel="nofollow">article</a> related and I have tried to implement it but its not working for me I still getting the same issue and I have no clue why.</p>
  
  <p>Below is what I have implemented from the article:</p>
  
  <p>For Apache on Ubuntu 14.04, edit the configuration file with the following command:</p>
  
  <pre><code>sudo nano /etc/apache2/sites-available/000-default.conf
  </code></pre>
  
  <p>Add the highlighted lines below between the  tags.</p>
  
  <pre><code>Apache VirtualHost Config
  &lt;VirtualHost&gt;
  …    
      &lt;files xmlrpc.php&gt;
        order allow,deny
        deny from all
      &lt;/files&gt;
  &lt;/VirtualHost&gt;
  </code></pre>
  
  <p>Save and close this file when you are finished.</p>
  
  <p>Restart the web server to enable the changes:</p>
  
  <pre><code>sudo service apache2 restart
  </code></pre>
  
  <p>What is weird is when I restart the droplet the website works for a couple of seconds so.. I cant figure out how to fix it. </p>
  
  <blockquote>
    <p>Droplet details:  512 MB Memory / 20 GB Disk / LON1 - Ubuntu WordPress
    on 14.04</p>
  </blockquote>