How to install WordPress CMS on Oracle Linux

To Install WordPress CMS in Oracle Linux

-------------------------------------------------------------------

WordPress is a popular open-source content management system (CMS).A content management system is basically a tool that makes it easy to manage important aspects of your website It is the simplest and most popular way to create your own website or blog.It was written in PHP.

Installation steps:

Step 1: Check the OS version by using the below command

[root@linuxhelp ~]# cat /etc/os-release 
NAME="Oracle Linux Server"
VERSION="8.4"
ID="ol"
ID_LIKE="fedora"
VARIANT="Server"
VARIANT_ID="server"
VERSION_ID="8.4"
PLATFORM_ID="platform:el8"
PRETTY_NAME="Oracle Linux Server 8.4"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:oracle:linux:8:4:server"

Step 2: Check the PHP version by using the below command

 [root@linuxhelp ~]# php -v
PHP 8.0.13 (cli) (built: Nov 16 2021 18:07:21) ( NTS gcc x86_64 )
Copyright (c) The PHP Group
Zend Engine v4.0.13, Copyright (c) Zend Technologies
    with Zend OPcache v8.0.13, Copyright (c), by Zend Technologies

Step 3: Check MySQL version by using the below command

 [root@linuxhelp ~]# mysql --version
mysql  Ver 15.1 Distrib 10.3.28-MariaDB, for Linux (x86_64) using readline 5.1

Step 4: Check webserver version by using the below command

[root@linuxhelp ~]# httpd -v
Server version: Apache/2.4.37 (Oracle Linux)
Server built:   Nov 17 2021 13:40:38
Step 5: Install PHP modules by using the below command
 [root@linuxhelp ~]# yum install php-curl php-xml php-zip php-mysqlnd php-intl php-gd php-json php-ldap php-mbstring php-opcache 
Last metadata expiration check: 1 day, 20:16:31 ago on Friday 26 November 2021 09:35:06 AM IST.
Package php-common-8.0.13-1.el8.remi.x86_64 is already installed.
Package php-xml-8.0.13-1.el8.remi.x86_64 is already installed.
Package php-mysqlnd-8.0.13-1.el8.remi.x86_64 is already installed.
Package php-gd-8.0.13-1.el8.remi.x86_64 is already installed.
Package php-common-8.0.13-1.el8.remi.x86_64 is already installed.
Package php-mbstring-8.0.13-1.el8.remi.x86_64 is already installed.
Package php-opcache-8.0.13-1.el8.remi.x86_64 is already installed.
Dependencies resolved.
  Installing       : libicu69-69.1-1.el8.remi.x86_64                                                                                    1/5 
  Installing       : libzip-1.8.0-1.el8.remi.x86_64                                                                                     2/5 
Installed:
  libicu69-69.1-1.el8.remi.x86_64            libzip-1.8.0-1.el8.remi.x86_64                     php-intl-8.0.13-1.el8.remi.x86_64         
  php-ldap-8.0.13-1.el8.remi.x86_64          php-pecl-zip-1.20.0-1.el8.remi.8.0.x86_64         
Complete!

Step 6: Login to MySQL database by using the below command

[root@linuxhelp ~]# mysql -u root -p
Enter password: 
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 80
Server version: 10.3.28-MariaDB MariaDB Server
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

Step 7: Create database for WordPress by using the below command

MariaDB [(none)]> create database wordpress;
Query OK, 1 row affected (0.001 sec)

Step 8: use the database by using the below command

MariaDB [(none)]> use wordpress;
Database changed

Step 9: Create a database user by using the blow command

MariaDB [wordpress]> create user 'admin'@localhost identified by 'admin@123';
Query OK, 0 rows affected (0.002 sec)

Step 10: provide permissions to the user admin by using the below command

MariaDB [wordpress]> grant all on wordpress.* to 'admin'@localhost;
Query OK, 0 rows affected (0.001 sec)

Step 11: restrict other privileges by using the below command

MariaDB [wordpress]> flush privileges;
Query OK, 0 rows affected (0.002 sec)

Step 12: Exit from the database by using the below command

MariaDB [wordpress]> exit
Bye

Step 13: change directory to downloads by using the below command

[root@linuxhelp ~]# cd /root/Downloads/

Step 14: List the contents by using the below command

 [root@linuxhelp Downloads]# ls
wordpress-5.8.2.tar

Step 15: unzip the file by using the below command

[root@linuxhelp Downloads]# gunzip wordpress-5.8.2.tar.gz && tar -xvf wordpress-5.8.2.tar
wordpress/
wordpress/xmlrpc.php
wordpress/wp-blog-header.php
wordpress/readme.html
wordpress/wp-signup.php
wordpress/index.php
wordpress/wp-cron.php
wordpress/wp-config-sample.php

Step 16: move the extracted folder by using the below command

[root@linuxhelp Downloads]# mv wordpress /var/www/html/

Step 17: change the ownership by using the below command

 [root@linuxhelp Downloads]# chown -R apache:apache /var/www/html/wordpress/

Step 18: change permissions by using the below command

 [root@linuxhelp Downloads]# chmod 755 /var/www/html/wordpress/

Step 19: Create and edit configuration file by using the below command

 [root@linuxhelp Downloads]# vim /etc/httpd/conf.d/wordpress.conf
<VirtualHost *:80>
ServerAdmin root@localhost
DocumentRoot /var/www/html/wordpress
<Directory "/var/www/html/wordpress">
Options Indexes FollowSymLinks
AllowOverride all
Require all granted
</Directory>
ErrorLog /var/log/httpd/wordpress_error.log
CustomLog /var/log/httpd/wordpress_access.log common
</VirtualHost>

Step 20: Restart the web server by using the below command

[root@linuxhelp Downloads]# systemctl restart httpd

Conclusion:

We have reached the end of this article. In this guide, we have walked you through the steps required to install WordPress CMS on Oracle Linux. Your feedback is much welcome.

FAQ
Q
Is WordPress provides themes?
A
Yes, Themes may be directly installed using the WordPress "Appearance" administration tool in the dashboard.
Q
WordPress is written in which language?
A
It was written in PHP.
Q
WordPress is free of cost?
A
Yes! The software is released under GPLv2.
Q
When was WordPress founded?
A
WordPress was released on May 27, 2003
Q
What is meant by LMS?
A
LMS stands for learning management system.