I originally wrote this article in a positive light but after a year plus I have an update..
Avoid Digital Ocean at all costs, they are shit.
Digital Ocean Problems:
- Horrible, horrible customer service. Look elsewhere if you want rock solid support. DO just copy pastes boilerplate responses and are generally incapable of doing anything.
- Get ready for lots of downtime. Unless you can fine tune a DB get ready for constant downtime and reboots with little to no reason.
- Late payment on your account? They email you and after 3 weeks delete everything including your backups and images.
Digital ocean is a garbage service, you know what they say you get what you pay for. Aviod them at all costs you will thank me later.
********** Original article below **********
So I recently went through shared hosting hell with a host that start with a color and ends in “host”, it’s not redhost or yellowhost, can you guess which crappy host it is?
I’m big fan of Linode but did I really need an unmanaged VPS for a few small scale sites at that price? These sites are tiny, netting under 5k a month (traffic) and not doing much under the hood.
Enter Digital Ocean , yes that is a referral link that nets me a whopping 10 bucks, anyhow this is why I choose them.
- 5$ for 512MB ram
- 20GB SSD !
- 1 TB transfer
- LAMP stack installed
You can’t beat full server access for 5 beans on a solid state drive that is also scalable and includes “snapshots” and backups. Is it to good to be true, well I guess I will find out, but so far so good:) The problem of course is that it’s unmanaged, setting up a plain jane WordPress is easy enough, just click the WordPress button when you log in and it will automatically create everything for you.
But I didn’t want Digital Ocean to install WP for me since I was moving existing sites, and since I had to do this multiple times (yes you can “clone” a droplet I know), here is my TODO rundown. It’s not an in depth guide, it’s just a reminder so I don’t spend all day configuring a damn server.
1. Sign in and create a droplet , make sure the droplet name doesn’t match your FQDN.
2. Create a LAMP image in the application menu, that way you don’t have to built PHP/MySQL and Apache, yay?
The downside: the LAMP image is only available on Ubuntu bleh, it will have to do. This should take about 45 seconds. Also it’s an Ubuntu LAMP without PECL, so nothing cutting edge ..or let’s be honest released within the last 4 years…
3. SSH into your server , change the root password that was send via email.
4. Create a new user with root privileges like this guide.
5. Remove the root login and change the port #.
6. Configure Apache logs, I don’t know where they are by default. Open apache config and set the logs some place nice. The server has logrotate, configure it.
7. Install APC to cache the PHP. This is a pain since Ubuntu’s APC package is old and has a shit bug in it. So if you apt-get php-apc make sure to set the APC config file, specifically setting
apc.slam_defense = 0. By the way the default install does not load module settings via `php.ini`, look in `conf.d`.
Remember server will blowup if U not add some basic APC settings.
8. Enable some apache modules, use
a2enmod for headers, rewrite and expires, they are somewhere in the apache2 directory, I think under `mods-available`.
9. Download (wget) WordPress.
10. Create a database user and import the .sql files, a guide.
11. Grab all the files, actually just grab /wp-content and SSH them onto the server, since WordPress is already there.
12. Configure the apache vhost, which is in apache2/sites-available. For WordPress make sure AllowOveride All..bunch of other stuff .allow from all is set for permalinks!
13. Edit the wp-config.php file with new database stuff
14. Restart Apache
15. Go into the Digital Ocean admin and create a snapshot of your droplet so you don’t have to do that ever again.
1. Rename the default SQL password, since it is set to ‘password’ , nice.
2. Need email? Configure exim4, don’t forget to change the php.ini setting for sendmail so your email doesn’t look like spam.
3. apt-get update
4. Install/configure a firewall (iptables, fail2ban).
5. Grab a beer.
Oh ya someone made a Vagrant manager for Digital Ocean that looks like it would be the way to go –> https://github.com/smdahlen/vagrant-digitalocean