The Migration – Step-by-Step Journey

A detailed guide on migrating a WordPress website to AWS, including domain transfer, hosting, Stripe integration, and Google Analytics.

Published on Jan 28, 2025

Table of Contents

    Introduction

    Migrating my website to AWS was a structured process that involved several key steps, each contributing to a simpler, faster, and more secure website. Here’s how I approached the migration:

    Domain Transfer to AWS Route 53

    The first step in my migration journey was transferring my domain from Namecheap to AWS Route 53. Here’s how I tackled it:

    Setting Up Route 53

    Before starting the transfer, I made sure I had an active AWS account. Route 53 provides an option to transfer domains directly, and I paid $14 to register my domain with AWS for the year. This fee was necessary even though I had recently renewed my registration with Namecheap.

    Obtaining the Transfer Code

    The transfer process began with obtaining the transfer authorization code from Namecheap. Thankfully, this was easily accessible through their dashboard. For comparison, I had also transferred another business domain from Squarespace, where it took a few hours to receive the transfer code via email. Both providers made this step straightforward.

    Approving the Transfer

    The actual transfer from Namecheap to AWS was completed within a couple of hours. A key step was approving the transfer request via an email from Namecheap, which expedited the process. In contrast, Squarespace lacked this option, requiring me to wait 10 days for their automatic approval.

    Updating DNS Records

    Once the transfer was complete, I needed to recreate my DNS records in AWS Route 53. Cloudflare, my previous DNS provider, made this simple by offering an export option for DNS records, which I could import into Route 53 with ease.

    Post-Transfer Diligence

    After the DNS setup, I verified that my website traffic was being routed through AWS instead of Cloudflare. I also confirmed that my Outlook email was functioning correctly. For my other business domain, which uses Gmail, I conducted similar checks to ensure email delivery wasn’t disrupted.

    Building and Hosting the Website on AWS S3

    Unlike a typical migration of a WordPress site, I chose a different path: using the UX design of my WordPress website as a reference to rebuild the site without WordPress. This approach allowed me to create a streamlined, static website tailored to my needs. The process was both fun and efficient, thanks to the tools and expertise I had access to:

    Rebuilding Without WordPress

    Using ChatGPT, I tapped into a wealth of knowledge on best practices for UX design, SEO optimization, and development. This guidance, combined with my experience using the 11ty framework, made the project faster and easier to implement. For this project, I also used Tailwind CSS for the first time—and I loved it. Compared to my personal website, www.theluismiranda.com personal website, which uses Bootstrap, Tailwind CSS felt much more intuitive and easier to integrate with 11ty.

    Hosting the Website on AWS S3

    Hosting the website in AWS S3 was straightforward and came with several advantages. I automated the deployment process using GitHub Actions. With this setup, any code pushed to the main branch of my GitHub repository is automatically synced with my S3 bucket. This eliminated the need for manual uploads and streamlined my workflow.

    Leveraging CloudFront

    To make my website publicly available and optimize its performance, I used AWS CloudFront. This service ensures my website is cached across AWS’s global network, allowing for fast loading times no matter where visitors are located. CloudFront also comes with built-in benefits like free SSL certificates and AWS Shield protection, providing robust security without additional costs or the need to manage a VPS server.

    This rebuild and hosting process not only simplified my website architecture but also made it more scalable, secure, and cost-effective.

    Integrating Stripe Payments with a Lambda API

    Integrating Stripe for payments was one of the most critical parts of this migration, and it provided several opportunities to enhance both security and reliability. Here’s how I approached it:

    Separating the API from CloudFront

    Initially, I considered using CloudFront to handle API traffic, but I quickly learned it’s not ideal for APIs. CloudFront’s primary purpose is caching, which doesn’t add value for APIs. Instead, I used API Gateway, which offers a secure and scalable solution. To enhance security and simplify CORS configurations, I created a subdomain for the API: api.devscreativestudio.com. This keeps the API separate from the main website (www.devscreativestudio.com) while maintaining a consistent domain structure.

    Stripe’s Accessibility and Reliability

    I’ve worked with various payment systems, including Chase Payment, but Stripe stood out for its excellent documentation and a modern, intuitive dashboard. Stripe also provides seamless integration with AWS services, which made setting up webhooks straightforward. Webhooks offer a more reliable way to receive payment success notifications compared to relying on client-side interactions. For example, if a client’s browser closes during the payment process, the webhook ensures the notification is still received.

    Enabling the Stripe Sandbox

    To test the webhook functionality, I needed to enable Stripe’s sandbox environment. This required submitting a request via a form (Stripe Sandbox Access Form). Using the sandbox, I verified that payments were processed successfully and that the webhook reliably notified my API of payment events.

    Testing Webhooks

    Stripe makes webhook testing simple with its workbench dashboard. The dashboard allows you to trigger specific events and includes detailed logs of incoming requests. These logs were invaluable during the development process, particularly for debugging payment session requests and ensuring the API handled events as expected.

    This integration process not only simplified payment handling but also ensured that my website could reliably process transactions without manual intervention.

    Implementing Google Analytics (GA) for my website was more involved than simply adding a tracking code. With GDPR regulations in place, it’s now essential to obtain a visitor’s consent before GA can collect data. This step was particularly important since I offer my services in the EU.

    With access to my website’s code, it was straightforward to create a consent management workflow. Visitors are presented with a banner where they can choose to accept or reject analytics tracking. Once a choice is made, GA is configured to respect the consent settings by enabling or disabling data collection as required.

    Collaborating with ChatGPT for Event Planning

    Configuring GA became a fun and educational process with the help of ChatGPT. Together, we reviewed each page of my website to identify which user interactions should be tracked. This included events like, such as how far a visitor scrolls on a page, which services they click on, external links they follow, and areas of the page they hover over.

    Configuring Events in GA

    Setting up these events in GA was surprisingly easy with the right guidance. For example, I configured scroll depth tracking to measure visitor engagement and set up tracking for clicks on service cards and outbound links. This data provides valuable insights into how clients interact with my website and which services or areas garner the most attention.

    By implementing these features, I ensured compliance with GDPR while gaining actionable insights to improve the user experience and optimize my services.

    The Benefits of Migrating to AWS

    After completing the migration, the advantages of moving my website to AWS became clear. Here are the key benefits I’ve experienced:

    Simplified Management

    With AWS, I only have one vendor to manage for hosting, DNS, and domain registration. This consolidation has significantly reduced the mental load of juggling multiple service providers and streamlined my operations.

    Cost Savings

    Hosting my personal website on AWS costs less than $1 per month—a stark contrast to my previous hosting expenses The business website is also cheaper to maintain, with CloudFront providing caching for fast global loading at no extra cost. AWS includes free SSL certificates and AWS Shield protection, eliminating additional expenses for security..

    Scalability and Flexibility

    AWS offers a wide range of services that I can leverage as my business grows. For instance, integrating API Gateway and Lambda with Stripe has made payment processing seamless and efficient. These tools not only simplify development but also reduce the need for heavy infrastructure.

    Efficient Deployment

    Using GitHub Actions integrated with AWS, deploying updates to my website is quick and hassle-free. This automation saves time and effort, allowing me to focus more on enhancing my services and products.

    Enhanced SEO Control

    Having full access to my website’s code has given me greater control over SEO optimization. I can implement OpenGraph tags, structured data, and other SEO techniques without relying on WordPress plugins, saving costs while boosting my site’s search visibility..

    Final Thoughts

    Migrating my website to AWS was a transformative experience, resulting in a faster, more secure, and cost-effective platform. With these improvements, I can now focus on growing my business and delivering value to my clients.

    Share this article: