Our Leadership team is attending CloudFest 2026, from Mar 22 - April 8. Schedule a Connect

Our Leadership team is attending CloudFest 2026, from Mar 22 - April 8.

Discuss MSP growth, DevOps excellence, and Cloud Transformation. Available for 1:1 meetings, Schedule a Connect

  • DevOps
    Case Study

    How we built a resilient multi-account, multi-cloud solution for a Health Tech service provider!

    READ CASESTUDY
    icon

    24/7 DevOps as a Service

    Round-the-clock DevOps for uninterrupted efficiency.

    icon

    Infrastructure as a Code

    Crafting infrastructure with ingenious code.

    icon

    CI/CD Pipeline

    Automated CI/CD pipeline for seamless deployments.

    icon

    DevSecOps

    Integrated security in continuous DevOps practices.

    icon

    Hire DevOps Engineers

    Level up your team with DevOps visionaries.

    icon

    Consulting Services

    Navigate success with expert DevOps consulting.

  • TechOps
    Case Study

    How we built a scalable Odoo solution for a Travel Tech service provider!

    READ CASESTUDY

    WEB HOSTING SUPPORT

    icon

    HelpDesk Support

    Highly skilled 24/7 HelpDesk Support

    icon

    Product Support

    Boost your product support with our expertise.

    MANAGED SERVICES

    icon

    Server Management

    Don’t let server issues slow you down. Let us manage them for you.

    icon

    Server Monitoring

    Safeguard your server health with our comprehensive monitoring solutions.

    STAFF AUGMENTATION

    icon

    Hire an Admin

    Transform your business operations with our expert administrative support.

    icon

    Hire a Team

    Augment your workforce with highly skilled professionals from our diverse talent pool.

  • CloudOps
    Case Study

    How we helped a Private Deemed University in India, save US $3500/m on hosting charges!

    READ CASESTUDY
    icon

    AWS Well Architected Review

    Round-the-clock for uninterrupted efficiency

    icon

    Optimize

    Efficient CloudOps mastery for seamless cloud management

    icon

    Manage

    Automated CI/CD pipeline for seamless deployments

    icon

    Migrate

    Upgrade the journey, Migrate & Modernize seamlessly

    icon

    Modernize

    Simplify compliance complexities with our dedicated services

    icon

    FinOps as a Service

    FinOps as a Service

  • SecOps
    Case Study

    How we built a scalable Odoo solution for TravelTech service provider!

    READ CASESTUDY
    icon

    VAPT

    Vulnerability Assessment and Penetration Testing

    icon

    Source Code Review

    Ensuring source code security ans safe practices to reduce risks

    icon

    Security Consultation

    On demand services for improving server security

    icon

    System Hardening

    Reduced vulnerability and proactive protection

    icon

    Managed SoC

    Monitors and maintains system security. Quick response on incidents.

    icon

    Compliance as a Service

    Regulatory compliance, reduced risk

  • Insights
    Case Study

    How we helped a Private Deemed University in India, save US $3,500/m on hosting charges!

    READ CASESTUDY
    icon

    Blog

    Explore our latest articles and insights

    icon

    Case Studies

    Read about our client success stories

    icon

    Flipbook

    Explore our latest Flipbook

    icon

    Events

    Join us at upcoming events and conferences

    icon

    Webinars

    Watch our educational webinar series

  • Our Story
  • Contact Us

Interested to collaborate?

Get in touch with us!

Ready to elevate your business with certified cloud expertise? Contact us today to learn how our team can help you leverage cloud technology to drive growth, streamline operations, and enhance security.

  • AWSAWS
  • Azure CloudAzure Cloud
  • Google CloudGoogle Cloud
  • Akamai CloudAkamai Cloud
  • OVHOVH
  • Digital OceanDigital Ocean
  • HetznerHetzner
  • Managed Services Overview
  • Kubernetes Consulting
  • DevOps as a Service
  • Infrastructure Monitoring
  • Kubernetes Consultancy Services
  • K8s & Cloud native Solutions
  • 24/7 Infrastructure Monitoring
  • DevOps as a Service
  • Cloud CI/CD Solutions
  • White Labeled MSP Support
  • Our story
  • Life@SupportSages
  • Insights
  • Careers
  • Events
  • Services
  • Managed Services

aws partneraws advanced partner
LinkedInFacebookXInstagramYouTube
SupportSages

Copyright © 2008 – 2026 SupportSages Pvt Ltd. All Rights Reserved.
Privacy PolicyLegal TermsData ProtectionCookie Policy

Building up a WordPress website with AWS – PART 1

Albert Reilly

  • 8 min read
Building up a WordPress website with  AWS – PART 1

Generating audio, please wait...

Configuring your Instance

This series will help you create a WordPress website on AWS. This first part will help you configure your EC2 instance by installing LAMP (Linux Apache MySQL PHP) on it. We will move on to set virtual host on the instance to use multiple domains if needed. In the third part, we will be installing phpMyAdmin and will follow some steps to secure it. We will install WordPress on the server in the fourth part followed by configuring the WordPress site contents to be loaded from AWS CDN using S3 bucket and CloudFront.

The first and foundational step is to create a new instance followed by installing and configuring the required software. Creating an instance in AWS is simple and you can follow their documentation if you are not familiar.

https://docs.aws.amazon.com/efs/latest/ug/gs-step-one-create-ec2-resources.html

CentOS is considered to be a more stable distribution mainly because package updates are less frequent compared to Ubuntu. Control Panels like cPanel offered to web hosting is mainly focused on CentOS and RHEL. On the other hand, Ubuntu has more support and solution can be found easily. If you are a beginner, you can go for Ubuntu. Here, we will be choosing the CentOS AMI (Amazon Machine Image).

Installing Apache

Apache is the most common and popular web server, which makes it a great choice for hosting a website. SSH into your server by the key you have made. Switch to root and make the package list up to date and then install Apache.

$ ssh -i Downloads/a_xx1.pem [email protected]

$ sudo -i

# yum update -y

# yum install httpd -y

Once installed, you can start Apache and make it start on boot. You can verify everything is okay by calling the IP address in the browser (http://xxx.xxx.xxx.xxx) and the default Apache web page. Here, we will be denoting the IP address as xxx.xxx.xxx.xxx.

# systemctl start httpd.service

# systemctl enable httpd.service

Installing MySQL

Next, we will be installing MariaDB, a drop-in replacement for MySQL. After the installation is complete, we will need to start and enable MariaDB.

# yum install mariadb-server mariadb -y

# systemctl start mariadb

# systemctl enable mariadb

After installation, we will need to run a security script that will remove some dangerous defaults and lock down access to our database system.

# mysql_secure_installation

You will be asked current root password. Leave it blank by pressing enter and set a new root password in the next prompt. Go ahead and enter Y and follow the instructions. You will be removing some sample users and databases, disabling remote root logins, and load these new rules so that MySQL immediately respects the changes we have made.

# mysql_secure_installation

NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB

SERVERS IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY!

In order to log into MariaDB to secure it, we'll need the current

password for the root user. If you've just installed MariaDB, and

you haven't set the root password yet, the password will be blank,

so you should just press enter here.

Enter current password for root (enter for none): 

OK, successfully used password, moving on...

Setting the root password ensures that nobody can log into the MariaDB

root user without the proper authorisation.

Set root password? [Y/n] y

New password: 

Re-enter new password: 

Password updated successfully!

Reloading privilege tables..

... Success!

By default, a MariaDB installation has an anonymous user, allowing anyone

to log into MariaDB without having to have a user account created for

them. This is intended only for testing, and to make the installation

go a bit smoother. You should remove them before moving into a

production environment.

Remove anonymous users? [Y/n] y

... Success!

Normally, root should only be allowed to connect from 'localhost'. This

ensures that someone cannot guess at the root password from the network.

Disallow root login remotely? [Y/n] y

... Success!

By default, MariaDB comes with a database named 'test' that anyone can

access. This is also intended only for testing, and should be removed

before moving into a production environment.

Remove test database and access to it? [Y/n] y

- Dropping test database...

... Success!

- Removing privileges on test database...

... Success!

Reloading the privilege tables will ensure that all changes made so far

will take effect immediately.

Reload privilege tables now? [Y/n] y

... Success!

Cleaning up...

All done! If you've completed all of the above steps, your MariaDB

installation should now be secure.

Thanks for using MariaDB!

Installing PHP

PHP will be processing the code to display dynamic content. It can connect to the database and get needed data. We will be installing PHP 7.2 here.

Promotional banner

PHP 7.x packages are available in several different repositories. We will be using the Remi repository which provides newer versions of various software packages including PHP. The Remi repository depends on the EPEL repository, and we need to install the EPEL repository first.

# yum install epel-release -y

# yum install http://rpms.remirepo.net/enterprise/remi-release-7.rpm -y

Start by enabling the PHP 7.2 Remi repository and move on to install some common PHP modules.

# yum-config-manager --enable remi-php72

# yum install php php-common php-opcache php-mcrypt php-cli php-gd php-curl php-mysqlnd -y

# php -v

PHP 7.2.15 (cli) (built: Feb 5 2019 19:50:47) ( NTS )

Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies

with Zend OPcache v7.2.15, Copyright (c) 1999-2018, by Zend Technologies

After restarting Apache, you can test PHP by creating a new info page, Inf.php with the below content and accessing it via the browser (http://xxx.xxx.xxx.xxx/Inf.php).

# systemctl restart httpd.service

# vi /var/www/html/Inf.php

Note:

For quick setup, run the below command. However, you will be prompted during the MySQL script running.

yum update -y && yum install httpd mariadb-server mariadb -y && systemctl start httpd.service && systemctl enable httpd.service && systemctl start mariadb && systemctl enable mariadb && yum install epel-release -y && yum install http://rpms.remirepo.net/enterprise/remi-release-7.rpm -y && yum-config-manager --enable remi-php72 && yum install php php-common php-opcache php-mcrypt php-cli php-gd php-curl php-mysqlnd -y && systemctl restart httpd.service && mysql_secure_installation

You have now installed the LAMP stack. This will allow you to install most kinds of websites and web software on your server.

We will be discussing other aspects of building a WordPress website with AWS in the next article.

Get 24/7 expert server management

 

  • Apache
  • VPS
Promotional banner
Promotional banner
Building up a WordPress website with AWS – PART 1

Building up a WordPress website with AWS – PART 2

Building up a WordPress website with AWS – PART 2
  • Apache
  • VPS
logo

Building up a WordPress website with AWS – PART 3

Building up a WordPress website with AWS – PART 3
  • Apache
  • VPS
logo

Building up a WordPress website with AWS – PART 4

Building up a WordPress website with AWS – PART 4
  • WordPress
logo

Building up a WordPress website with AWS – PART 5

Building up a WordPress website with AWS – PART 5
  • Linux
  • WordPress
logo

Posts by Albert Reilly

Albert likes to explore and learn new things. He is hardworking, enthusiastic and is getting expertise in Linux administration, Networking and Security areas. He understands client requirements and is able to act accordingly. He has been working for 2 years with us.