WordPress on AWS Lightsail

I migrated a local WordPress installation to AWS Lightsail. Having worked with Google Cloud in the past I have to say I liked AWS Lightsail. I don’t think GCE is equivalent to Lightsail. The latter is easier to use for standalone small deployments such as a small WordPress site.

Lightsail has very affordable pods starting at $3.50/month. If you have a small site I think this pod should do. There are predefined images from Bitnami with the stack that you need. For WordPress I used the LAMP stack which comes with PHP and MariaDB. AWS doesn’t have the helper scripts from GCloud but it’s not too hard to SSH into your pod or copy files over SFTP.

Migrating the database and copying the files was straightforward but then I had problems with the URLs and redirects. It seems that this is a common problem when changing the domain of a website. There are two methods to deal with it: setting RELOCATE in wp-config.php or manually updating wp_options in the database. You need to update the fields siteurl and home.

If your pages contain hardcoded URLs that point to the old domain you will have to change them manually. There are mentions of different plugins and scripts that help in this search and replace process.

Leave a comment

Your email address will not be published. Required fields are marked *