If you are running an e-commerce WordPress site as an online store for your core business then the site should have the ability to serve customers during high traffic and sudden server failure otherwise it can lead to a loss in your business. Although setting up a single virtual server is easier but it is also worth to consider a high-availability cluster. In a cluster setup, different parts of the server architecture are handled by different server instances rather than running everything on a single computer server. In this type of setup, you can easily scale the server by adding more employees when the load increases a lot and also you can see your server running even when one or more of the employees don’t work for any reason.
E-commerce WordPress Site Using ClusterCS
If you don’t have enough technical knowledge regarding WordPress website then it is better you contact any WordPress e-commerce development services and get your website ready and then do settings of ClusterCS to take benefits of cloud computing. In this article, I will discuss how to use ClusterCS to create a scalable cluster of servers and to use it to host an E-commerce WordPress site based on WooCommerce plugin.
Set up Your ClusterCS Account
ClusterCS is actually a control panel for servers in the cloud. It gives the power of regular control panels to your dedicated and virtual servers and collects all of them behind a single user interface tool. This tool was actually created for handling the hosting accounts hence it is well tested in real-life production environments. ClusterCS is building for multi-server applications like E-commerce WordPress site and also for maintaining individual servers.
First, you have to create a ClusterCS account on its website https://clustercs.com/. It is a free account which will help you to manage a single server and up to five separate domains running on it.
Start Some Virtual Servers
ClusterCS is a control panel dashboard which is using the power of virtual servers or dedicated servers like Amazon Web Services (AWS), Digital Ocean or virtual machine on your laptop. Create an AWS account and then sign into AWS console to create the server instances for website setup. Create these instances:-
- Load Balancer
- Two or more Application Servers
- Database Server
- Now run the servers.
Step 1: Create a Security Group
Launch the servers for a cluster and make sure that they can communicate with each other and ClusterCS can reach them using SSH. In AWS, firewall settings are done using a Security Group. In AWS admin console, first, create Security Group. Then add rules. Now in the first step, you should allow SSH access from the ClusterCS IP Addresses. After that, you should allow the HTTP and HTTPS access from anywhere so that your customers and visitors can access your website. Then Save the changes.
After creating the security group, you can see it has an ID which you can use to configure the settings to access between your cluster’s server instances. You can use this ID to modify the rules.
Add a new rule with the security group ID as the traffic source. You can choose to allow all of the specific TCP traffic from this source. To connect to AWS instances from your computer add an SSH rule for your IP. Finally, allow FTP access for uploading files to the server cluster. After this step, you can start the servers.
Step 2: Start AWS Server Instances
As you have already set up security group now you can launch the AWS instances for the cluster. AWS has many options for customizing the virtual servers but default options are also good. From the dashboard, press the launch instance button. Now select the base image of your virtual server and choose option Amazon Linus AMI. Then choose an instance type which fits the needs of your website. Always run the database on a more powerful server with more memory. Now select the existing security group I defined above and then press launch to start the instances. Repeat this process for the next instances until all servers for the cluster start running.
Step 3: Now Attach Elastic IP Addresses to Your Instances
Is there anything to explain?
Step 4: Now verify that you can access the servers
If you have any problem in connecting then return to the security group settings and make sure that all of the required ports are accessible. Then move to the ClusterCS to setup the software for the servers on the cluster.
Set up the Server Cluster
As server instances are now up and running, now you can configure them to work in running your e-commerce WordPress site in the multi-server cluster environment. You can do this using the ClusterCS control panel.
Step 1: Add Server Instances to the Cluster
Step 2: Configure the Cluster
Now Configure the Domain
You should now have a server cluster with a database server, two application servers and a load balancer which is routing traffic to the different instances. Now you can start using the cluster by setting up the website. Now click on the Domain in the ClusterCS menu and then add a domain.
Now Set up WordPress
You Now can set up the WordPress. Good things about ClusterCS setup is that even if you are using multiple servers, the installation is not different from what you do with a single server or sharing hosting.
Step 1: Create a Database for Your E-Commerce Site
Also, create username password and set their permissions. The database is now ready to be used.
Step 2: Install WordPress
Download the latest WordPress version and use FTP, using the username/password to upload it to your new site. When it is done, open the website’s URL in your browser and run the WordPress installation. When your WordPress installation is ready, set up WooCommece and any other plugin and themes which you want to use on your e-commerce website.
l Use ClusterCS to Optimize Your WordPress Setup
Till now you have configured a multi-server WordPress website on ClusterCS. This site is reliable, safe, well organized and scalable. What will you do if your online store gets huge traffic? Do these steps.
Step 1: Add More Servers to the Cluster
Step 2: Caching
This is also easy to do and in the Speed section of ClusterCS dashboard, you can configure a rule for how requests coming to your website should be handled.
We have just discussed how to use ClusterCS to setup a cluster of AWS servers and an E-commerce WordPress site on it. We have also discussed how to configure the setting for caching for handling high traffic spikes. You can understand that these steps can also be used for smaller one sever setups. You can also use them to go deeper into the details of your setup. ClusterCS has so many options for all of these things. You can learn from about the ClusterCS on its website or raise your query to the ClusterCS staff and they can resolve your query easily.