Start a Project

How to setup WooCommerce on AWS

In this article, we will show you all the steps to install WordPress and enable and configure the WooCommerce plugin on AWS.

WordPress is a free and open-source content management system based on PHP and MySQL. For installing it on AWS, you need to set up a required environment for installation.

Requirements to install WordPress :

STEP 1: Install Apache2, MYSQL, PHP 7.4, and its modules

Apache, Php, and Mysql database are needed for the WordPress backend. All three applications can be configured with these commands.

STEP 2: Install MYSQL Server In your System

Case 1: If you are using Local Database Server

Case 2: If You Are Using AWS RDS

Amazon RDS handles routine database tasks, such as provisioning, patching, backup, recovery, failure detection, and repair.

You do not need to worry about anything, everything is managed at the AWS end.

Firstly you have to launch an RDS and then configure it with your Ec2 instance

Follow the instructions below if you are using an AWS RDS:

STEP 3: SSH User Creation

Presently, we were in our server’s root user but due to security issues, we can not keep our application code in the directories of the root user. So, we have to create another SSH with limited access rights.

Create an SSH user who will be the owner of the application code. I create an SSH user with the name “woocommerce” You can pick any name you want.

Eventually, this prompts a password window where you can set the password. And, the remaining fields can be left empty by simply pressing the enter key.

Additionally, after creating a user, we will switch to the newly created user.

STEP 4: Install WordPress CMS

Go to your root and download the latest WordPress File

After downloading, a directory name “wordpress” will be created inside the public HTML directory.

STEP 5: Apache configurations

However, to support the web pages we will configure apache and we need to switch again to the root user for the required configurations.

After executing the above command, we have to define the Domain name and the DocumentRoot Path.

Save it, and exit after this.

Furthermore, configure the envvars file using executing the below command:

And find these lines :

Modify the apache SSH username in this way :

configure apache2.conf file using the following command:

Now, you will find the block code shown below:

Modify it to the following code:

STEP 6: Run the below commands

to set the permission on the wordpress root directory

Now, Go to the browser and hit your domain

Select your preferred language

define your database details in the below step and proceed ahead

Now, Click on Submit and install WordPress.

Here, WordPress has been successfully installed.

STEP 7: How to install WooCommerce on AWS

Now, start the installation by clicking on the ‘Install now’ button and wait for the operation to be completed.

Finally, click on the ‘Activate’ button: the WooCommerce configuration procedure will start.

Fill out the required information and click on the “Continue” Button.

Finally, you will be recommended some particularly useful plugins that can be installed immediately.

For configuring the Free Self-signed certificates from let’s encrypt, Please click on this link.

Need Support?

Thank You for reading this Blog!

For further more interesting blogs, keep in touch with us. Also if you need any kind of support, simply raise a ticket at https://webkul.uvdesk.com/en/.

For further help or query, please contact us or raise a ticket.

Exit mobile version