March 28, 2024

Install WordPress with apache on centos rhel fedora

Introduction

WordPress is a free and open-source CMS (content management system), which is widely used for making blogging websites. WordPress is basically the most famous CMS in the world because of its plugins which help most of the blogger to quickly start their blogging career. This makes WordPress a great choice for getting a website up and running quickly and easily.

So in this guide, we would demonstrate how to install WordPress on your server, with Apache and Mysql.

Prerequisites

  1. A dedicated server or a VPS (Virtual Private Server ) with centos 7 minimal installation.
  2. Apache, MySql, and PHP should be installed on your server.

Step 1: Create a MySQL Database and User for WordPress

To get started login to Mysql with the root account.

# mysql -u root -p

It will prompt for the Mysql root password. After entering the password create a database using the command as follows:-

# CREATE DATABASE wordpress;

Next, we are going to create a new MySQL user account that we will use exclusively to operate on WordPress’s new database.

# CREATE USER wordpressuser@localhost IDENTIFIED BY 'password';

Grant privileges to database

# GRANT ALL PRIVILEGES ON wordpress.* TO wordpressuser@localhost IDENTIFIED BY 'password';

FLUSH privileges

# FLUSH PRIVILEGES;

Once these commands have all been executed, we can exit out of the MySQL command prompt by typing:

# exit

Step 2:- Install WordPress

Go to /var/www/html directory using the following command

# cd /var/www/html

Now we are ready to download the latest WordPress:

# wget http://wordpress.org/latest.tar.gz

Next extract the WordPress archive

# tar -xvzf latest.tar.gz

Now you have all WordPress files on your /var/www/html directory (which is your apache hosting directory).

use chown to grant ownership to Apache’s user and group:

# sudo chown -R apache:apache /var/www/html/*

Step 3:- Configure WordPress

Now go to /var/www/html directory where WordPress has been installed.

Open wp-config.php with your favourite text editor to change the database username and password which we have created on step 1.

These are the only values that you need to change, so save and close the file when you are finished.

Step 4:- Complete Installation Through the Web Interface

Now that you have your files in place and your software is configured, you can complete the WordPress installation through the web interface. In your web browser, navigate to your server’s domain name or public IP address:

http://server_domain_name_or_IP

First, you will need to select the language that you would like to install WordPress with. After selecting a language and clicking on Continue, you will be presented with the WordPress initial configuration page, where you will create an initial administrator account:

Fill the information for the site and administrative account.

WordPress will confirm the installation, and then ask you to log in with the account that you just created:

To continue, hit the Log in button at the bottom, then fill out your administrator account information:

After hitting the login button you will see the admin console as shown below:-

You can now start managing your WordPress website.

Conclusion

Now you successfully installed WordPress on your dedicated or a VPS (Virtual Private Server) Server. f you had any difficulties or questions, please submit them in the comment section below.

For WordPress hosting check out this URL:- https://www.siteground.com/index.htm?afcode=3cf92a080741ab7230fb1dff14712a0a

Vedant Kumar

Currently I'm working as an Implementation Engineer, Started my career as an System Administrator - Linux. Additionally loves to explore new technologies and research about new open-source software that ease the development cycle.

View all posts by Vedant Kumar →

Leave a Reply

Your email address will not be published. Required fields are marked *


The reCAPTCHA verification period has expired. Please reload the page.

close

Ad Blocker Detected!

VEDANT EXPLAINS
We've noticed that you are using an ad blocker. Advertising helps fund our server cost and keep it truly independent. It helps to build our content creator team. So please disable your ad blocker, and help us to keep providing you with free- great content - for free. Thank you for your support.

Refresh