I’ve been running my blog on WordPress using Host Gator for almost 10 years. While I have never had problems with my hosting provider, I have wanted to explore options to migrate to either Azure or AWS. I recently read about how AWS Lightsail would be the most affordable and simple option. I then looked for documentation to help me with the migration and ran into a lot of conflicting information. Hopefully, the issues and solutions detailed below will help others wishing to migrate their WordPress blog to AWS Lightsail.
I spent a lot of time looking for documentation on how to migrate my WordPress site to Lightsail. I found two articles to be the most helpful starting points. Both of them have some overlap, but together they got me through the migration. The first: Migrate an existing WordPress blog to Amazon Lightsail, does a really good job of walking you through the steps of exporting your current WordPress site to your new Lightsail instance.
Note: There are other articles out there that advise using services or plugins that cost money. Do not use them. The abovementioned article walks you through migrating your data for free.
There are only three things that I would add to this documentation. The first is that I would recommend turning on automatic snapshotting during the creation of the instance.
The second is that I would recommend patience when doing the data import. The XML file you download in the export phase is small and only details what data to pull from your existing site. So while uploading that file takes a few seconds, the actual data migration can take 10-20 minutes.
The third thing is that in this process some things will need to be redone or cleaned up. For example, in your new Lightsail instance, you will have to download the theme from your old site, reenter your site identity info, and clean up the sample pages and posts from your site.
Networking and Security
The second article: Quick start guide: WordPress on Amazon Lightsail, has a bit of overlap with the first but does a great job of addressing how to attach a static IP to your website (it is free but you will be given a dynamic IP initially), and mapping a domain name to your website. The article provides a link to another article that goes into more detail about the DNS process.
The last thing that I needed help with was the SSL certificate process. The nice thing about Lightsail is that the SSL certificate you receive from Let’s Encrypt is free. The thing that may discourage some is that it requires entering commands in the CLI to accomplish. But I think that this article uses clear and simple steps to get your SSL certificate installed.
The only thing that I ran into was that I ended up with a problem because my website showed up as being insecure because of mixed content. I fixed this by using the Really Simple SSL WordPress plugin. I used the free version and it cleared up my issue with a few clicks.
I went through quite a bit of trial and error to migrate my website to AWS Lightsail. It is a pretty easy process that can save you a few dollars but most importantly help you with gaining a few new skills.