Migrating WordPress sites to Digital Ocean

Here's a rough outline of the steps I do at the moment to migrate a site based on a Duplicator backup.

Notes

It's all fairly laid back, until you get to the point of setting up Let's Encrypt, because you have to have the DNS pointing at the site before you can get the cert.

If you have access to it, one way to do that is with a copy of an existing LE set of certificates, and set that up in advance.

Steps

Automation

Would be nice to have this automated via e.g. [[Ansible]].

Simple Apache .conf template

This will get amended when running certbot –apache.

<VirtualHost *:80>
	ServerAdmin {{ admin_email }}
	ServerName {{ domain }}
	ServerAlias www.{{ domain }}

	DocumentRoot /var/www/{{ domain }}

	ErrorLog ${APACHE_LOG_DIR}/error.log
	CustomLog ${APACHE_LOG_DIR}/access.log combined

	<Directory /var/www/{{ domain }}>
		Options Indexes FollowSymLinks MultiViews
		AllowOverride all
		Order allow,deny
		allow from all
	</Directory>
</VirtualHost>