Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

How to Install WordPress on Oracle Linux 8

WordPress is a free, open-source, self-hosted CMS software solution that allows you to host a blog or website on the internet. It is very popular for beginners who don’t know how to code a website. Wordpress is secure, fast, customizable, and comes with tons of themes and plugins that help you to extend the functionality of your website. It is written in PHP and uses MySQL/MariaDB as a database backend. This popular platform is a great choice for getting a website up and running quickly.
commerce.

In this post, we will explain how to Install WordPress using a LAMP stack on OracleLinux 8.

Prerequisites

  • A fresh OracleLinux 8 server on the Atlantic.Net Cloud Platform
  • A root password configured on your server

Step 1 – Create Atlantic.Net Cloud Server

First, log in to your Atlantic.Net Cloud Server. Create a new server, choosing OracleLinux 8 as the operating system with at least 2GB RAM. Connect to your Cloud Server via SSH and log in using the credentials highlighted at the top of the page.

Once you are logged in, run the following Command to update your base system with the latest available packages.

dnf update -y

Step 2 – Install LAMP Stack

Before starting, install the LAMP stack components like Apache web server and MariaDB using the following command:

dnf install httpd mariadb-server -y

After installing both packages, you will need to install PHP and other PHP extensions to your system.

First, reset the default PHP 7.2 with the following command:

dnf module reset php

Next, enable PHP version 7.4 using the following command:

dnf module enable php:7.4 -y

Next, install PHP 7.4 with other extensions using the following command:

dnf install php php-fpm php-cli php-json php-gd php-mbstring php-pdo php-xml php-mysqlnd php-pecl-zip curl -y

Once all the packages are installed, start and enable Apache, PHP-FPM, and MariaDB services using the following command:

systemctl start httpd mariadb php-fpm
systemctl enable httpd mariadb php-fpm

Step 3 – Create a Database for WordPress

WordPress uses MySQL/MariaDB to store the contents, so you will need to create a database and user for WordPress:

First, connect to the MariaDB with the following command:

mysql

Once you are connected, create a database and user with the following command:

CREATE DATABASE wordpressdb;
CREATE USER `wordpressuser`@`localhost` IDENTIFIED BY 'securepassword';

Next, grant all the privileges to the WordPress database using the following command:

GRANT ALL ON wordpressdb.* TO `wordpressuser`@`localhost`;

Next, flush the privileges and exit from the MariaDB with the following command:

FLUSH PRIVILEGES;
EXIT;

Step 4 – Download WordPress

Next, change the directory to the Apache default web root directory and download the latest version of WordPress with the following command:

cd /var/www/html
curl https://wordpress.org/latest.tar.gz --output wordpress.tar.gz

Once the download is completed, extract the downloaded file with the following command:

tar xf wordpress.tar.gz

Next, change the directory to WordPress and rename the WordPress configuration file:

cd wordpress
mv wp-config-sample.php wp-config.php

Next, edit the WordPress configuration file and define your database settings:

nano wp-config.php

Change the following lines:

/** The name of the database for WordPress */
define( 'DB_NAME', 'wordpressdb' );

/** Database username */
define( 'DB_USER', 'wordpressuser' );

/** Database password */
define( 'DB_PASSWORD', 'securepassword' );

Next, set proper ownership of the WordPress directory with the following command:

chown -R apache:apache /var/www/html/wordpress
chmod -R 755 /var/www/html/wordpress

Step 5 – Configure Apache to Host WordPress

Next, you will need to create an Apache virtual host file to host the WordPress. You can create it with the following command:

nano /etc/httpd/conf.d/wordpress.conf

Add the following lines:


ServerAdmin root@localhost
ServerName wordpress.example.com
DocumentRoot /var/www/html/wordpress

Options Indexes FollowSymLinks
AllowOverride all
Require all granted

ErrorLog /var/log/httpd/wordpress_error.log
CustomLog /var/log/httpd/wordpress_access.log common

Save and close the file, then restart the Apache service to apply the configuration changes:

systemctl restart httpd

Step 6 – Access WordPress Installer

Now, open your web browser and access the WordPress installer using the URL http://wordpress.example.com. You should see the following screen:

Select your language and click on the Continue button. You will be redirected to the following screen:


Provide your site information and click on the Install WordPress button. You should see the following screen:

Click on the Log In button. You should see the following screen:

Provide your admin username and password and click on the Log In button. You should see the WordPress dashboard on the following screen:

Conclusion

In the above guide, we learned how to install WordPress with LAMP on OracleLinux 8. You can now install the necessary plugins and themes and start creating your first website from the WordPress dashboard. Give it a try on your dedicated server from Atlantic.Net!

The post How to Install WordPress on Oracle Linux 8 appeared first on Atlantic.Net.



This post first appeared on The Atlantic.Net, please read the originial post: here

Share the post

How to Install WordPress on Oracle Linux 8

×

Subscribe to The Atlantic.net

Get updates delivered right to your inbox!

Thank you for your subscription

×