How To Install WordPress 4.9.x On Redhat/CentOS 7

How To Install WordPress 4.9.x On Redhat/CentOS 7

How to install WordPress 5 or 4.9 version in Centos Linux. This is an Open Source Content Management System to run the website. It’s very easy to use and friendly user interface.  

We can easily install WordPress locally and we don’t need to do anything while we do install WordPress on GoDaddy. We can easily install WordPress on hosting providing platforms like GoDaddy, the digital ocean. Install wordpress cpanel

You may download all available WordPress version.

Check Out: Sentrifugo 3.2 Failed To Connect Gmail Account SMTP Issue

Let’s Begin the Installation:

Step 1: You will have to install the required packages if you want to install make it LAMP setup.

yum install mariadb mariadb-server php php-common php-mysql php-mbstring php-mcrypt php-gd php-xml 

The above command will create a LAMP setup for your WordPress sites.

I’m going to create a different Server for the database.

yum install mariadb mariadb-server -y

Check Out: How To Disable IPv6 Network Interface On Linux 7

systemctl start mariadb && systemctl enable mariadb

Step 2: Now create a user and database for WordPress website

Login to Database Server, mysql -u root -p

how to install wordpress

Create a database and use it.

create database wordpress;

install wordpress linux

Now you will have to create a user for WordPress and assign grant permission on the WordPress database to this user.

create user 'testing'@'192.168.185.128' identified by 'password';
grant all privileges on wordpress.* to 'testing'@'192.168.185.128' identified by 'password';

linux install wordpress 5 version

Check Out: How To Configure Rancher Container Orchestration Server In Linux

Check Grants permission

show grants for ‘testing’@’192.168.185.128’;

wordpress install linux

Run the below command to reload the MariaDB configuration.

flush privileges;

If you want, you can add MariaDB port in the firewall.

firewall-cmd --permanent –add-port=3306/tcp
firewall-cmd --reload

Check Out: How To Apply SSL Certificate On Load Balancer On Amazon Cloud

Step 3: I will install PHP, httpd, and WordPress on the same server except for the database.

yum install php php-common php-mysql php-mbstring php-mcrypt php-gd php-xml 

Install the Apache Server

yum install httpd -y
systemctl start httpd && systemctl enable httpd

Step 4: Install WordPress, I have downloaded the WordPress 4.9

Extract the WordPress tar file

tar -zxf wordpress-4.9.10.tar.gz

Move WordPress folder to /var/www/html/

mv wordpress /var/www/html/

Step 5: Now you need to set the permission on WordPress. By default, the owner is nobody and the group is nfsnobody of WordPress folder.

Check Out: How To Install Apache Open Office On Ubuntu 18.04

Change the owner and group of WordPress and put 755 permission

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

Create a Manually uploads directory

mkdir -p /var/www/html/wordpress/wp-content

install wordpress linux centos

Now you have to make Apache to the owner of this Uploads directory and allow apache to write to the uploads directory.

chown -R apache:apache /var/www/html/wordpress/wp-content/uploads

Step 6: Now move the wp sample file to wp-config file

mv wp-config-sample.php wp-config.php

Here you will have to define the database settings.

vim wp-config.php

Step 7: Configure a website  

vim httpd.conf

Check Out: How To Install Podman and Run Container On Linux 8

Click on Continue and hit the URL: yourserverip_domain_name:/wp-admin

Click on let’s go

you have to fill your database details and click on submit

Run the installation and if you’re not able to create config.php file, you can manually do in the WordPress directory and copy the code in this file.

Check Out: How To Install Portainer Web UI For Docker On Linux

Click on install WordPress

Sign in with your username and password.

As you can see the installation finished and we can use WordPress.

YouTube Link: Install WordPress 5.4 On Linux 8

You’re done install wordpress linux 5 version centos

Share on:

I'm the founder of Curious Viral. I hope this blog will provide you complete information about Linux Technology & I would like to share my technical knowledge with you which I have learned during this period.

Other Posts You May Like...

Leave a comment