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
- After verification, 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.
- Name your managed app and managed server.
Step 3: Select Amazon Web Services (AWS)
- 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.
Step 5: Set up Your Preferred Bandwidth
- 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.
Step 7: Choose Data Center Location
- Select the data center nearest to you for perfect latency.
Step 8: Launch Server
- Click Launch Now, and voilà! Your WooCommerce store on Cloudways is now ready to rock!
- Wait until your server is ready, and then witness the magic of hosting WooCommerce on AWS.
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.
- Select your application.
- 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.
- 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.”
- Step 3: Select an operating system for your server. In this example, we’re using the Amazon Linux 2 AMI.
- Step 4: Choose 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.
- Step 6: Create a new key pair by clicking on the “Create new key pair” option.
- 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.
- Step 8: The key will be downloaded to your computer; be sure to save it for the upcoming steps.
- 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.
- 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.
- Step 12: After configuring all the necessary settings, simply click the “Launch Instances” button to initiate the launch of your virtual server.
- Step 13: The process will only take a few seconds to complete.
- Step 14: Congratulations! You’ve now successfully launched your EC2 instance.
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.
- 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.
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.
“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.
- Step 3: Click “Open” to establish a connection to your virtual cloud server (EC2) using 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
- Step 2: Install the Apache web server on your server via PuTTY with the command:
yum install httpd
- Step 3: Start the Apache web service using this command:
systemctl start httpd.service
- Step 4: Ensure the Apache web service starts automatically on boot with the following command:
systemctl enable httpd.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.
- Step 7: Now, use the following command to install MariaDB as your database:
yum install mariadb-server mariadb
- Step 8: Start the MariaDB service.
- Step 9: Enhance the security of your MariaDB installation with the following command.
mysql_secure_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.
- Step 11: Enable the MariaDB service to start automatically on boot with:
systemctl enable mariadb.service
- Step 12: Now, install your preferred PHP version on your Amazon server with this command:
amazon-linux-extras install php7.3
- Step 13: Restart the Apache web server:
systemctl restart httpd.service
- Step 14: Create and edit a file at your specified path.
- Step 15: Paste the following PHP code into the file (right-click) and then press “ESC” and type “:wq!” to save it:
php <?php for ($count=1; $count<=9; $count++) { echo " $count times 9 is ". $count*9; echo "<br>"; } ?>
- Step 16: To run the newly created PHP file in your browser, use this URL format: http://yourIPaddress/danish.php.
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
- Step 2: Generate a new database specifically for WordPress with this command:
CREATE DATABASE danishdb;
- Step 3: Create a new user and assign a password using the following command:
CREATE USER danishuser@localhost IDENTIFIED BY ‘password’;
- 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’;
- 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.”
exit
- Step 7: The next step is to navigate to the HTML folder. Change the directory using this command:
cd /var/www/html/
- Step 8: You are now in the HTML folder. It’s time to download the latest WordPress version. Use the following command:
wget https://wordpress.org/latest.tar.gz
- Step 9: Extract the WordPress archive file with this command:
tar xzvf latest.tar.gz
- Step 10: Assign the ownership by running this command:
chown -R apache:apache /var/www/html/wordpress/*.
- Step 11: Change your directory from “html” to “WordPress” with the command:
cd 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
- Step 13: Edit the ‘wp-config.php’ file with the following command:
nano wp-config.php
- Step 14: Modify the values of DB_NAME, DB_USER, and DB_PASSWORD to connect the database with your WP application.
- Step 15: Now, in your web browser, go to your WordPress file URL “http://yourIPaddress/wordpress” to access the basic WordPress installation setup screen.
- Step 16: Continue the installation process by providing the required information.
- Step 17: You’ve successfully installed the WordPress application on an AWS server.
- Step 18: Next, log in to your WordPress 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.
Sarim Javaid
Sarim Javaid is a Sr. Content Marketing Manager at Cloudways, where his role involves shaping compelling narratives and strategic content. Skilled at crafting cohesive stories from a flurry of ideas, Sarim's writing is driven by curiosity and a deep fascination with Google's evolving algorithms. Beyond the professional sphere, he's a music and art admirer and an overly-excited person.