# The Price of Not maintaining a WordPress Droplet is crashes

- Link: https://tongfamily.com/2021/05/21/the-price-of-not-maintaining-a-wordpress-droplet-is-crashes/
- Published: 2021-05-21T11:01:29-07:00
- Author: rich

Well, I’ve had two DigitalOcean droplets running WordPress for the last two years
and I basically haven’t paid them any attention. So, don’t be that person. Either
move to a server-less installation where someone else is doing the work. With DigitalOcean,
you can create your own droplet which is their term for a virtual server. This turned
out to be much faster than Bluehost and since it is your own server, I got the latest
versions of PHP and so forth.

But the problem is that you can’t really leave this stuff alone, so when trying 
to fix a site here is what I discovered so everyone should be careful.

 1. If you use Updraft running, make sure that you point it at an “infinite” store.
    I had thought that it was pointed to my paid Google Drive (with 2PB worth of storage),
    but I had not set this correctly, so instead my modest 25GB disk virtual server
    was literally completely filled with backups. I had it set to keep 400 backups 
    and do it weekly which is way too much, so I reset to 100 backups every month. 
    Remember, this is just in addition to what Digital Ocean is doing anyway.
 2. The net is that if you are going to use a service like this, you should also pay
    for regular backups. Digital Ocean has an easy to use backup service. So your $
    5 node costs an additional $1 to get full backups. I also have snapshots (you have
    to run them with the server stopped), but backups are a must. If you do this, then
    you don’t really need the WordPress level backup although theoretically, the WordPress
    one is synchronous so in the unlikely event, you are doing a post right when a 
    backup is being made, you will have an inconsistent system.
 3. My biggest mistake was not understanding what was going on and just going from 
    a $5/month to a $10/month node to get 50GB. What happens if you are out of disk
    though is the [automatic resize](https://vander.host/knowledgebase/operating-systems/how-to-resize-an-ubuntu-18-04-lvm-disk/)
    will actually fail because there is no disk space left. [So when using](https://askubuntu.com/questions/332949/what-command-do-i-use-to-find-physical-disk-size)`
    [lsblk](https://askubuntu.com/questions/332949/what-command-do-i-use-to-find-physical-disk-size)`
    I saw that I had a 50GB drive, but was only using 25GB. As soon as I freed up space,
    ubuntu automagically went to 50GB.
 4. Once that was done, I could reset Updraft and also do an [rsync](https://phoenixnap.com/kb/how-to-rsync-over-ssh)
    to copy down those updraft files as additional insurance.

In any case, a quick remove of all the `/var/html/updraft` files from last year 
got me enough space and once that happened the resize could happen and the droplet
could breath again!

## Do not reset the password on the root account.

The second dilemma is that I wanted to copy all the backed up files down, but I 
discovered that from the Admin console on Digital Ocean it kept on asking for a 
password. With AWS, when you use the console it knows about your ssh keys and you
never have to type a login, with Digital Ocean, every droplet by default has password
over ssh turned off for security reasons, so you can’t actually use the graphical
login.

I didn’t realize this and ran the reset password from the Digital Ocean console.
Now I was in real trouble, I was not in an infinite loop because authentication 
is turned off, so I could login the first time, but it would not save the new password
and kept on asking for it. The solution by the way is that when you ssh in, you 
can’t execute bash. This is the thing that is doing the checking so `ssh root@_your_droplet_ip_address`
does not work, but if you run a command like `ssh root@_your_droplet_ some_command`
then that works.

## Keeping up with version

The really horrible thing though about having a droplet is that you have to maintain
it. I have not touched this droplet in a long time and I had forgotten what a pain
it is to keep things up to date. Specifically, there are security issues with the
PHP that is in ubuntu 18.04 (the droplet template I used), so I really needed to
upgrade to 20.04. That turns out not to be too hard. You basically run a single 
command. There is this cool [upgrade command](https://ubuntu.com/blog/how-to-upgrade-from-ubuntu-18-04-lts-to-20-04-lts-today)
called `do-release-upgrade` which does the whole conversion. It is pretty painless.

And of course, you have to do the `apt-get update && apt-get upgrade` as well. Geez,
I really want to move as quickly as possible to a JAMStack because then I’m not 
maintaining an entire operating system.

## Solutions where you do not maintain a server

Well, there are few, first is that [Digital Ocean now has Applications as a service](https://siipo.la/blog/installing-wordpress-on-digitalocean-app-platform),
so if you like WordPress, you move to their managed MySQL service and then you can
package up WordPress as a special GitHub repo and run it that way. You use something
called Bedrock to do this.

Or you can use tools like [Locust](https://mohsensy.github.io/sysadmin/2020/03/29/wordpress-apache.html)
to upload a standard WordPress image, this still leaves you with the update problem.

## Moving WordPress to Hugo

Well, it turns out that if you want to move from WordPress, you can do this. You
can for instance, get all your images by doing an [rsync of the media folder](https://devowl.io/2020/how-to-download-export-wordpress-media-library/)
and then recreating it. It is sort of painful to recreate all of this because the
standard WordPress user interface doesn’t have a media download button although 
they have a media upload one.

Or if you have a large site, you can try an [export utility to get your text and your images over](https://gohugo.io/tools/migrations/).
Of these, the little [Java application](https://github.com/nantipov/wordhugopress)
you run on your local machine to do this. For me, I’m mainly working on small “vanity”
sites, so all I really need are the images and then will pour them into a new template
on the Hugo side.

So to move things from WordPress, the main thing is that you can find the [media uploads](https://www.wpbeginner.com/beginners-guide/where-does-wordpress-store-images-on-your-site/)
in `/home/1264501.cloudwaysapps.com/eeaewzxvun/public_html/wp-content/uploads`

### Share this:

 * [  Mastodon ](https://tongfamily.com/2021/05/21/the-price-of-not-maintaining-a-wordpress-droplet-is-crashes/?share=mastodon)
 * [  LinkedIn ](https://tongfamily.com/2021/05/21/the-price-of-not-maintaining-a-wordpress-droplet-is-crashes/?share=linkedin)
 * [  Facebook ](https://tongfamily.com/2021/05/21/the-price-of-not-maintaining-a-wordpress-droplet-is-crashes/?share=facebook)
 * [  WhatsApp ](https://tongfamily.com/2021/05/21/the-price-of-not-maintaining-a-wordpress-droplet-is-crashes/?share=jetpack-whatsapp)
 * [  Email ](https://tongfamily.com/2021/05/21/the-price-of-not-maintaining-a-wordpress-droplet-is-crashes/?subject=%5BShared%20Post%5D%20The%20Price%20of%20Not%20maintaining%20a%20WordPress%20Droplet%20is%20crashes&body=https%3A%2F%2Ftongfamily.com%2F2021%2F05%2F21%2Fthe-price-of-not-maintaining-a-wordpress-droplet-is-crashes%2F&share=email)
 * [More](https://tongfamily.com/2021/05/21/the-price-of-not-maintaining-a-wordpress-droplet-is-crashes/#)

 * [  Telegram ](https://tongfamily.com/2021/05/21/the-price-of-not-maintaining-a-wordpress-droplet-is-crashes/?share=telegram)
 * [  Print ](https://tongfamily.com/2021/05/21/the-price-of-not-maintaining-a-wordpress-droplet-is-crashes/#print?share=print)
 * [  Pinterest ](https://tongfamily.com/2021/05/21/the-price-of-not-maintaining-a-wordpress-droplet-is-crashes/?share=pinterest)
 * [  Tumblr ](https://tongfamily.com/2021/05/21/the-price-of-not-maintaining-a-wordpress-droplet-is-crashes/?share=tumblr)
 * [  X ](https://tongfamily.com/2021/05/21/the-price-of-not-maintaining-a-wordpress-droplet-is-crashes/?share=twitter)

### Like this:

Like Loading…
