DEV Community

Cover image for SETUP WORDPRESS WEBSITE USING LAMP STACK
Oluwaseun Olaleye
Oluwaseun Olaleye

Posted on

SETUP WORDPRESS WEBSITE USING LAMP STACK

USE CASE
My manager has assigned me the task of creating a website. To accomplish this, I will be utilizing WordPress, a popular open-source content management system (CMS). WordPress enables users to create and manage their own websites efficiently.

With WordPress, I will be able to design, develop, and launch a fully functional website. The platform offers a user-friendly interface, customizable themes, and a vast array of plugins to extend its functionality.

PREREQUISITES

  • Basic Linux commands.

  • Ubuntu server.

  • Custom Domain.

DEFINITION OF SERVICES USED.

The following services are utilized in this tutorial:

  1. Linux: An open-source operating system used as the foundation for our server.
  2. Apache: A popular open-source web server software responsible for serving web pages.
  3. MariaDB (instead of MySQL): An open-source relational database management system used for storing and managing data.
  4. PHP: A server-side scripting language used for developing dynamic web applications and interacting with the database.

LINUX(UBUNTU SERVER)

To begin, we'll create an Ubuntu server in our AWS console.

Image description

Image description

Image description

Now that your Ubuntu server is launched, let's connect to it using SSH.

Image description

Image description

APACHE

Next is to install apache and start the service.

Image description

To confirm that Apache is correctly installed and configured on our server, we can access the default Apache webpage using our server's IP address.

Image description

DATABASE MANAGEMENT SYSTEM
Next is to install a open-source relational database management system on the server.

Image description

Now that we have installed MariaDB, let's configure it for WordPress.

Image description
Next, we'll create a database that will store and manage data for our WordPress website. To do this, we'll log in to the Mariadb server and create a new database, along with a user account that will be used to interact with the database.

Image description
Next is to create a new user for the database and grant all the privileges to the database for the user.

Image description

Image description

WORDPRESS
Now that we have configured MariaDB database, let's download and install WordPress.

Image description

Image description

Image description

Image description

To ensure proper functionality and security, we need to change the ownership of the WordPress files. This will allow the web server to read, write, and execute files as necessary.

Image description

PHP
Now that we have WordPress installed, let's configure it using a PHP script. This script will help us set up the database connection, create the necessary tables, and configure the basic settings for our WordPress site.

Image description
Let's enable the WordPress configuration file that was created.

Image description

Next is to disable the default Apache.

Image description

Let's install all the dependencies for WordPress.

Image description

Image description

Now that our server is set up, it can be accessed using the server's IP address or your custom domain name. The IP address can be mapped to the custom domain. In this guide, I will be using the IP address.

Image description

Image description

Kindly fill in all the database details as shown below.

Image description

Image description

Image description
Image description
Image description

Congratulations! You Have Successfully Installed WordPress website on your Ubuntu server using the LAMP (Linux, Apache, MySQL, PHP) stack.

Top comments (0)