Installing and Setting up a WordPress on RHEL 7 / CentOS 7

Basic Requirements

Step 1: Connect to the server using key or user/password

Step 2: update yum repo metadata.

Step 3: Install wget

Install LAMP (Linux, Apache, MySql [mariaDB] and PhP) stack

Step 1: Install, start, enable and check the status of Apache web server (httpd)

Step 2: Install and start MariaDB (MySQL)

Step 3: Configure MariaDB. Enter appropriate values on each prompt.

Step 4: Install php, php modules and restart httpd

Step 5: To test php installation, create simple PHP script. Open a test.php file using the following command.

Step 6: Copy the following php script to the file and save it.

Step 7: Now, try accessing the demo script using the public IP followed by demo.php as shown below. If every configuration is correct, you will see a web page with all the installed php information.

Configure Database User and Password For WordPress

We should not use the root user and password for WordPress. It should be used only for administrative purposes. So let’s create a new database, user, and password for the WordPress website we are going to set up.

Step 1: Login to MariaDB (MySQL) with root credentials you created. It will open the MariaDB shell where you can run the scripts for managing databases and its users.

Step 2: Create a database named wordpress. You can give your own database name.

Step 3: Now create a user named wordpress_admin for managing the wordpress database. You can choose your database username and password.

Step 4: Grant all database privileges to wordpress_admin on wordpress database.

Step 5: Flush the privileges using the following command.

Step 6: Exit the database shell

Install and Configure WordPress

Now that we have all the components required for running WordPress, we will go ahead with the WordPress installation.

Step 1: Download latest WordPress

Step 2: Extract the tar file.

Step 3: Copy wordpress folder content to /var/www/html folder

Step 4: Change the owner of /var/www/html to apache user. Because the WordPress files will be manipulated by httpd apache user.

Configuring WordPress

Step 1: cd in to /var/www/html folder

Step 2: Copy wp-config-sample.php to wp-config.php file.

Step 3: Open wp-config.php file and add the database details in the following parameters.

Thats it! If you browse to the IP you will be able to access the wordpress website

Related

In this tutorial am going to explain how to set up ruby on rails environment , create a rails application and test that…

Read more

Database connection: Connecting mongoDB with php is really simple if your configured php with mongoDB using php…

Read more

Converting a .pem to .ppk format is a matter of one line code. First, you need to have puttygen installed on your…

Read more

Internet is huge! Help us find great content

Newsletter

Never miss a thing! Sign up for our newsletter to stay updated.

About

The Best Tutorials & Tips to Speedup Your DevOps Workflow.

Created by Bibin Wilson.

All Udemy Course For $9.99