Integrated Tech Solutions

How to Host a WordPress Website for Free on AWS

By - Admin, Updated on January 23, 2023

Install Apache

1) apt install apache2

2) systemctl status apache2

Install Mariadb
1) sudo apt install mariadb-server

2) sudo mysql_secure_installation

Install PHP & Dependancies

sudo apt install php php-mysql
sudo apt install php-curl php-gd php-mbstring php-xml php-xmlrpc php-soap php-intl php-zip

Configure Database

1) mysql -u root -p

2) CREATE DATABASE wordpress_db;

3) CREATE USER ‘wp_user’@’localhost’ IDENTIFIED BY ‘password’;

4) GRANT ALL ON wordpress_db.* TO ‘wp_user’@’localhost’ IDENTIFIED BY ‘password’;

5) FLUSH PRIVILEGES;

6) Exit;

Install WordPress

1) cd /tmp && wget https://wordpress.org/latest.tar.gz

2) tar -xvf latest.tar.gz

3) cp -R wordpress /var/www/html/

4) chown -R www-data:www-data /var/www/html/wordpress/

5) chmod -R 755 /var/www/html/wordpress/

6) mkdir /var/www/html/wordpress/wp-content/uploads

7) chown -R www-data:www-data /var/www/html/wordpress/wp-content/uploads/

Configure virtualhosts
cp

Check apache configuration
sudo apache2ctl configtest

Disable Default site
sudo a2dissite 000-default.conf

Enable New site
sudo a2ensite example.com.conf

Install Certbot
sudo apt install certbot python3-certbot-apache

Install SSL Certificate
sudo certbot –apache

Check Autorenewal of SSL
sudo systemctl status certbot.timer

Keep Reading

👋 Hi, Find this Helpful? There is More

You Asked,
We made it!

fix japanese keyword hack

Step by Step Video Tutorials on trending topics in software development

Yes I am Curious »

AR in Websites – Top 3 Platforms for Bringing Augmented Reality to Your Web Experience

As technology advances, augmented reality (AR) is no longer limited to gaming or social media apps. Integrating AR into websites...

Know More »

Webhook Explained for Beginners: Everything You Need to Know

In the world of APIs, automation, and modern web applications, the term “webhook” often comes up. But what exactly is...

Know More »