A Journey in Learning

Preparing for Risks: WordPress Migration to an AWS LAMP stack

After finishing the Moodle site for my non-profit, I wanted to take a look at the WordPress site https://www.phillymosque.com. I read online that WordPress’s most recent update broke jQuery thus preventing me from editing or adding posts. I will need to update the old theme we have to a newer version. Today, I took it upon myself to downgrade our prod server’s WordPress version to 4.9, upon doing this the server broke….

Luckily I was able to build a test server using the same method I used for the Moodle LAMP Stack. I had an AMI that I was able to launch and assign to a new RDS instance. After launching I went into Bluehost and added route 53’s amazon DNS nameservers. I then assigned the new device an elastic IP and created a simple routing record pointing to it. I understand the traffic this site receives so its more important we offload the database rather than the website data. The RTO and RPO for this site can be a day or two. Also I am the only authorized user to make changes to the site so I don’t need to worry about changes that occur between my maintenance schedules.

After the Migration was complete, I tested the site and applied an SSL certificate using ben-cert tool. I was able to use this tool to terminate the SSL connection at the instance and didn’t need to add an application load balancer. After migration I noticed the website was loading inconsistently, some elements loaded fast and others loaded slowly. I debugged using chrome’s debugging tool to inspect elements and realized that old links still had the previous server’s IP address. I replaced the site and server’s IP address with the proper URL and resolved this issue. I also noticed that older scripts were running and throwing errors and I was able to edit JavaScript files to remove the erring script.

The site is running well, it loads quickly and not showing any major errors. I will revisit this after a few months to see if the site has any major issues or if I need to upscale my EC2 instances.