This website uses cookies

Our website, platform and/or any sub domains use cookies to understand how you use our services, and to improve both your experience and our marketing relevance.

✨ Vultr and Linode are back on Cloudways! VIEW PLANS→

How to Host WooCommerce on AWS (Amazon Web Services) – Amazon Cloud

Updated on October 18, 2023

13 Min Read
woocommerce on aws

Launching a website is now easier with AWS as your cloud hosting solution, WordPress as your CMS, and WooCommerce as the plugin of choice for ecommerce.

Sure, hosting WooCommerce on AWS can appear complex, involving technical aspects such as HTML, CSS, and JavaScript. However, much of this complexity is abstracted away with WordPress as your CMS.

In this blog, we will guide you through the process of hosting WooCommerce on AWS (with & without Cloudways) and discuss the setup prerequisites.

So, without any further ado, let’s get started.

WooCommerce Hosting on AWS – Setup Prerequisites

Setting up a WooCommerce store is key to transforming your dreams into the reality of selling your products and services to people worldwide.

But before hosting WooCommerce on AWS, here are some of the prerequisites you need to keep in mind:

  • Domain Registration: Start by registering a domain name that aligns with your business idea. Your domain name will serve as your website’s address on the internet.
  • WordPress Website: Use WordPress for website design and content management.
  • Page Builders (Optional): If you’re new to website design or prefer a user-friendly interface, consider using WordPress page builders for easy editing, thanks to the drag-and-drop functionality.

Once these elements are in place, you can proceed with the AWS setup and WooCommerce integration.

Optimized Cloudways WooCommerce Managed Hosting

Leverage SSD storage, advanced caching, PHP 8-ready servers, and much more with optimized Cloudways WooCommerce Managed Hosting.

Method#1: How to Host WooCommerce on AWS Using the Cloudways Platform [Easy Method]

If you are a Cloudways user, you can save hours of manual work & follow the steps below to host your WooCommerce application on AWS in minutes.

Step 1: Sign up on Cloudways

Sign up on the Cloudways platform

  • After verification, log in to your account and click the Add Server button.

log in to your account and click the Add Server button

Step 2: Select WordPress with WooCommerce

  • Locate WooCommerce under the Application & Server Details, and click Version 7.8.2 with WordPress Version 6.2.2.

Locate WooCommerce under the Application & Server Details, and click Version 7.8.2 with WordPress Version 6.2.2

  • Name your managed app and managed server.

Name your managed app and managed server

Step 3: Select Amazon Web Services (AWS)

  • Select AWS from the available Cloud providers.

Select AWS from the available Cloud providers

Step 4: Choose the Server Size

  • Choose your server size from the available options. If you hover over the server size, you will also see its RAM and CPU size.

Choose your server size from the available options

Step 5: Set up Your Preferred Bandwidth

  • Set up the estimated bandwidth usage of your WooCommerce website.

Set up the estimated bandwidth usage of your WooCommerce website

Step 6: Set Storage

  • Select your preferred Application Web Files and Database sizes. Cloudways allows you to scale the server size up and down depending on your requirements, even after launch.

Select your preferred Application Web Files and Database sizes

Step 7: Choose Data Center Location

  • Select the data center nearest to you for perfect latency.

Select the data center nearest to you

Step 8: Launch Server

  • Click Launch Now, and voilà! Your WooCommerce store on Cloudways is now ready to rock!

Click Launch Now

  • Wait until your server is ready, and then witness the magic of hosting WooCommerce on AWS.

Wait until your server is ready

Step 9: Access WooCommerce

  • Once your server is launched, you will see two tabs on your platform: a server management tab and an application management tab.
  • Click the Applications tab.

Click the Applications tab

  • Select your application.

Select your applicaiton

  • Under the Admin Panel tab, you should see the staging link to your WordPress site along with your username and password.

Under the Admin Panel tab, you should see the staging link to your WordPress site along with your username and password

  • You can access your WooCommerce site using these credentials and play around with the application & server settings to meet your needs.
  • And that’s it. That’s how easily & quickly you can host WooCommerce on AWS using Cloudways.

Method#2: How to Install WooCommerce on AWS (Manually)

Proceed with caution:

Creating and launching an AWS EC2 platform is a rather involved process. If you’re not well-versed in technical matters, you might find it more challenging than launching an AWS app with Cloudways, as we’ve explained earlier.

Let’s assume you’ve already signed up for an AWS account, as the signup process is straightforward. However, it’s worth noting that you’ll be asked to verify your account using a credit card after signing up.

Now, let’s move on to launching and setting up your EC2 instance on AWS:

  • Step 1: Begin by setting up an AWS-EC2 instance. To do this, navigate to Services > EC2 > Instances > Launch Instances. This will initiate the installation of a virtual server in the cloud.

Launch Instances

  • Step 2: Click “Add Tag” and provide the necessary information in the Key & Value fields. For instance, you can set the Key as “Name,” and the Value as something descriptive, like “DanishCloudways.”

Add Tag

  • Step 3: Select an operating system for your server. In this example, we’re using the Amazon Linux 2 AMI.

select an operating system

  • Step 4: Choose the 64-bit (x86) architecture.

Select the 64-bit (x86) architecture

  • Step 5: In the instance-type section, you can specify the number of vCPUs, RAM, and instance type for your server. The default selection is typically a t2.micro instance.

Instance-type section

  • Step 6: Create a new key pair by clicking on the “Create new key pair” option.

Create new key pair

  • Step 7: Enter the Key pair name, choose the key pair type and the private key file format. Then, click the “Create key pair” button.

click on the Create key pair button

  • Step 8: The key will be downloaded to your computer; be sure to save it for the upcoming steps.

key will be downloaded

  • Step 9: Moving on, you’ll need to configure the security group. To do that, you need to add a name and description for your security group. You can also establish new rules and define access points, including IPs.
  • Step 10: Click the “Edit” button, enter the group name, and select the necessary services like SSH, HTTP, and HTTPS. Also, specify the source for these rules and choose “Anywhere” for more open access.

click on the Edit button

  • Step 11: In the “Configure Storage” section, you have the option to add a new volume, adjust the volume size, and configure other storage-related settings.

Configure Storage

  • Step 12: After configuring all the necessary settings, simply click the “Launch Instances” button to initiate the launch of your virtual server.

Launch Instances

  • Step 13: The process will only take a few seconds to complete.

Launching instance

  • Step 14: Congratulations! You’ve now successfully launched your EC2 instance.

successfully launched

Converting a PEM File to a PPK File

Please note that if you obtained the PEM file during your Key pair creation, you must convert it to a PPK file.

If you downloaded the PPK file format, you can skip this part and proceed to the next step to access your server.

Assuming you already have PuTTY installed on your system, you can download it from this link: Download PuTTY. Now, let’s proceed with the conversion using PuTTYgen.

  • Step 1: Search for “PuTTYgen” in your Windows search bar and open the application.

search PuTTYgen on your Windows

  • Step 2: Click “Load” and select the PEM file you obtained when launching your EC2 instance.
  • Step 3: After loading the PEM file, click “Save private key” to download the PPK file, which you should save on your desktop.

download the PPK file

Now, you’ve successfully converted the PEM file to a PPK, and you’re ready to use this PPK file to access your cloud server. Let’s move on to the next steps.

Accessing Your Server Using PuTTY

Here’s the process to access your server through PuTTY:

  • Step 1: Launch PuTTY and enter “ec2-user@yourIPaddress” in the command line.

Access your Server Via PuTTY

ec2-user” is the default username. Make sure to replace “yourIPaddress” with your server’s public IP, which can be found in the AWS platform where you initiated the EC2 Instance.

  • Step 2: Go to “Connection” > “SSH” > “Auth” in PuTTY. Then, click “Browse” and select the PPK file you recently downloaded from AWS or PuTTYgen.

 select the PPK file

  • Step 3: Click “Open” to establish a connection to your virtual cloud server (EC2) using PuTTY.

access your virtual cloud server(EC2) via PuTTY

Once you’ve completed these steps, you should be able to access your AWS server successfully via PuTTY.

Deploy LAMP Stack

In this scenario, we’re starting with a fresh server setup, and our initial step is to deploy the foundational stack required for running web applications. For this purpose, we’ll set up the LAMP stack comprising Linux, Apache, MariaDB/MySQL, and PHP.

  • Step 1: To install the LAMP stack, gain root access by using the following commands:
sudo su

install the LAMP stack

  • Step 2: Install the Apache web server on your server via PuTTY with the command:
yum install httpd

install the Apache web server

  • Step 3: Start the Apache web service using this command:
systemctl start httpd.service

start the Apache web service

  • Step 4: Ensure the Apache web service starts automatically on boot with the following command:
systemctl enable httpd.service

Enable the Apache web service

  • Step 5: Open your browser and enter your server’s public IP to verify the successful installation of Apache.
  • Step 6: If you see the test page, it confirms that Apache has been installed correctly.

Enable the Apache web service

  • Step 7: Now, use the following command to install MariaDB as your database:
yum install mariadb-server mariadb

install MariaDB as a database

  • Step 8: Start the MariaDB service.

Start the MariaDB service.

  • Step 9: Enhance the security of your MariaDB installation with the following command.

improve the security of your MariaDB installation.

Note that during the first run, it will ask for the root password; just press Enter (there’s typically no root password set initially).

  • Step 10: If you wish to set a root password for your database, type “Y” and proceed with the password setup.

set the root password for your database

  • Step 11: Enable the MariaDB service to start automatically on boot with:
systemctl enable mariadb.service

enable the MariaDB service

  • Step 12: Now, install your preferred PHP version on your Amazon server with this command:
amazon-linux-extras install php7.3

install the PHP version

  • Step 13: Restart the Apache web server:
systemctl restart httpd.service

restart the Apache web server.

  • Step 14: Create and edit a file at your specified path.

Create and edit a file

  • Step 15: Paste the following PHP code into the file (right-click) and then press “ESC” and type “:wq!” to save it:
for ($count=1; $count<=9; $count++)
echo " $count times 9 is ". $count*9;
echo "<br>";

press ESC and type :wq!.

  • Step 16: To run the newly created PHP file in your browser, use this URL format: http://yourIPaddress/danish.php.

 run the newly created PHP file

Congratulations, you’ve successfully deployed the LAMP Stack on your server. The next step will cover the installation of the WordPress application.

Supercharge Your WooCommerce Store on Cloudways AWS Hosting

Experience WooCommerce on AWS with unmatched performance. Enjoy 24/7 support, free SSL certificates, automated backups, advanced caching, and more.

Install the WordPress Application

  • Step 1: Once you’ve successfully deployed the LAMP stack, the next task is to install the WordPress application. Start by accessing Root with the following commands:
mysql -u root -p

Accessing the Root account

  • Step 2: Generate a new database specifically for WordPress with this command:

generate a fresh database

  • Step 3: Create a new user and assign a password using the following command:
CREATE USER danishuser@localhost IDENTIFIED BY ‘password’;

Create a new user

  • Step 4: Grant full control of the database to the user. In this instance, where the database name is “danishdb,” the username is “danishuser,” and the password is ““password”:
GRANT ALL PRIVILEGES ON danishdb.* TO danishuser@localhost IDENTIFIED BY ‘password’;

Grant full control

  • Step 5: Apply the changes without restarting the DB service by running this command:

flush privileges

  • Step 6: Exit the Root account by typing “exit.”


  • Step 7: The next step is to navigate to the HTML folder. Change the directory using this command:
cd /var/www/html/

change the directory

  • Step 8: You are now in the HTML folder. It’s time to download the latest WordPress version. Use the following command:

download the latest WordPress version

  • Step 9: Extract the WordPress archive file with this command:
tar xzvf latest.tar.gz

extract the archive file of WordPress

  • Step 10: Assign the ownership by running this command:
chown -R apache:apache /var/www/html/wordpress/*.

assign the ownership

  • Step 11: Change your directory from “html” to “WordPress” with the command:
cd wordpress

Change to directory from html to WordPress

  • Step 12: Duplicate “wp-config-sample.php” and save it as “wp-config.php” using this command:
cp wp-config-sample.php wp-config.php

duplicate wp-config-sample.php

  • Step 13: Edit the ‘wp-config.php’ file with the following command:
nano wp-config.php

edit the wp-config. php file

  • Step 14: Modify the values of DB_NAME, DB_USER, and DB_PASSWORD to connect the database with your WP application.

change the value

  • Step 15: Now, in your web browser, go to your WordPress file URL “http://yourIPaddress/wordpress” to access the basic WordPress installation setup screen.

WordPress installation setup screen

  • Step 16: Continue the installation process by providing the required information.

Continue the installation process

  • Step 17: You’ve successfully installed the WordPress application on an AWS server.

WordPress application on an AWS server

  • Step 18: Next, log in to your WordPress account.

log in to your WP account

There you have it! WordPress is now installed on your Amazon EC2 Platform. Now, for the last step, you just need to install the WooCommerce plugin, and you’ll be good to go.

Installing WooCommerce Plugin Through WordPress Admin

Now that your WordPress site is ready, it is time to install the WooCommerce plugin. The simplest method is to use the WordPress Admin, which takes care of the entire process for you.

  • Navigate to Plugins > Add New.
  • In the search bar, type “WooCommerce.”
  • Click on “Install Now.”

After installation, click “Activate,” and you’re all set to begin with the WooCommerce Wizard.

Silicon Dales – Case Study

Read How Cloudways Helped WooCommerce Agency by Providing Them a Simplified AWS Hosting.

Thank You

Your eBook is on its Way to Your Inbox.

Wrapping Up!

Now you know the secret to launching your ecommerce store via WooCommerce hosting on Amazon Web Services (AWS). At Cloudways, we believe in making things easier, simpler, manageable, and understandable for all, so we’re committed to eliminating hosting hassles for you.

Still, if you deal with any confusion at any step of hosting WooCommerce on AWS through Cloudways, contact our 24/7 live chat support team and get your queries resolved in minutes.

Q1. Can I host WooCommerce on AWS?

A. Yes, you can host WooCommerce on AWS (Amazon Web Services). We have given the easy steps in our guide to help you host WooCommerce on AWS via Cloudways.

Q2. How do I host WooCommerce on AWS?

A. You can host WooCommerce on AWS via Cloudways by following the easy steps below:

  • Sign up on Cloudways
  • Select WordPress with WooCommerce
  • Select Amazon Web Services (AWS)
  • Choose the server size
  • Set up your preferred bandwidth
  • Set storage
  • Choose data-center location
  • Launch server
  • Access WooCommerce

Q3. Is AWS good for WooCommerce hosting?

A. Yes, AWS is a suitable option for WooCommerce hosting. It offers the scalability and performance needed for running an online store with WooCommerce.

Q4. What is the best and cheapest hosting for WooCommerce?

A. One of the top recommendations for WooCommerce hosting is Cloudways, starting at $11 USD per month (excluding taxes and including DigitalOcean hosting charges). This plan provides 1GB of RAM, 1 Core processor, 25GB storage, and 1TB of bandwidth, making it a cost-effective choice for hosting your online store.

Q5. How do I host AWS WooCommerce for free?

A. You can indeed host your personal website on AWS within the Free Tier’s limits, making it a very cost-effective option. In such cases, hosting your personal website typically costs around $0.50 per month. For a detailed breakdown of the services used and their associated costs, you can refer to the “Services Used and Costs” section.

Share your opinion in the comment section. COMMENT NOW

Share This Article

Sarim Javaid

Sarim Javaid is a Digital Content Producer at Cloudways. He has a habit of penning down his random thoughts and giving words and meaning to the clutter of ideas colliding inside his mind. His obsession with Google and his curious mind add to his research-based writing. Other than that, he's a music and art admirer and an overly-excited person.


Get Our Newsletter
Be the first to get the latest updates and tutorials.

Thankyou for Subscribing Us!


Webinar: How to Get 100% Scores on Core Web Vitals

Join Joe Williams & Aleksandar Savkovic on 29th of March, 2021.

Do you like what you read?

Get the Latest Updates

Share Your Feedback

Please insert Content

Thank you for your feedback!

Do you like what you read?

Get the Latest Updates

Share Your Feedback

Please insert Content

Thank you for your feedback!

Want to Experience the Cloudways Platform in Its Full Glory?

Take a FREE guided tour of Cloudways and see for yourself how easily you can manage your server & apps on the leading cloud-hosting platform.

Start my tour


  • 0


  • 0


  • 0


  • 0



For 4 Months &
40 Free Migrations

For 4 Months &
40 Free Migrations

Upgrade Now