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.
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
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
Create a database and use it.
create database wordpress;
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';
Check Grants permission
show grants for ‘testing’@’192.168.185.128’;
Run the below command to reload the MariaDB configuration.
If you want, you can add MariaDB port in the firewall.
firewall-cmd --permanent –add-port=3306/tcp firewall-cmd --reload
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.
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
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.
Step 7: Configure a website
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.
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