
πΈοΈWordPress + LAMP - Self Hosted CMS
2023-10-21
WordPress is one of the most popular content management systems and today we will deploy this famous open-source program on our very own cloud instance
First, create your virtual cloud instance. I will be making use of Ubuntu on xneelo.
Create an instance: How to guides
xneelo Cloud AWS EC2 MS Azure VM
Step 1
Update repositories
sudo apt update -ysudo apt upgrade -yStep 2
Install the Apache web server
sudo apt install apache2Start and enable Apache
sudo systemctl start apache2
sudo systemctl enable apache2Step 3
Install MariaDB database server
sudo apt install mariadb-serverSecure the database (Follow the instructions after running the command)
Copy the following code into a bash file.
This script will allow you to create a database, username, and password without the need to manually configure this.
Create the file
Paste the below code in the file and save the file by pressing Ctrl + x, Y & Enter
Run the script and set your database credentials
Step 4
Install PHP
Step 5
Navigate to the html directory
Download and install WordPress
Unpack the Tar file
Move the WordPress files
Remove the empty directory & tar.gz file
Set the permissions
Copy the WP-Config file
Configure the wp-config file with the MySQL database credentials
Update the lines as indicated below:
Remove the default index.html page
Create the .htaccess file
Complete the installation
Open your web browser of choice and navigate to your instance IP address. The WordPress installation wizard should appear.
You can follow the on-screen instructions to complete the installation
Your WordPress website will be accessible on your instance server IP address. You can connect a custom domain name to the website by pointing your DNS A '@' & 'www' records to the instance server IP address
You need to update the 000-default.conf file with your domain name. This file controls the default virtual host settings for your web server. To update the file, type the following command:
This will open the file in the nano text editor. Look for the ServerName directive and replace the default value with your domain name. Save the file (Ctrl + x, Y & Enter) and exit the editor.
Thats it! You have installed WordPress and can continue to develop your website!
Last updated