Site icon installvirtual

How to install WordPress on centos 7

How to install WordPress on centos 7 /Redhat 7

In This tutorial you will learn how to install wordpress on Centos 7 / Redhat 7. You will see it is very easy to install wordpress on centos and make a website and manage your content on wordpress.. Firstly we need to know what is wordpress.?

WordPress is a free and open-source content management system (CMS) based on PHP and MySQL. Features include a plugin architecture and a template system. WordPress was used by more than 23.3% of the top 10 million websites as of January 2015. WordPress is the most popular blogging system in use on the Web, at more than 60 million websites.

It was released on May 27, 2003, by its founders, Matt Mullenweg and Mike Little. as a fork of b2/cafelog. The license under which WordPress software is released is the GPLv2 (or later) from the Free Software Foundation.

On this site you can download and install a software script called WordPress. To do this you need a web host who meets the minimum requirements and a little time. WordPress is completely customizable and can be used for almost anything. There is also a service called WordPress.com which lets you get started with a new and free WordPress-based blog in seconds, but varies in several ways and is less flexible than the WordPress you download and install yourself.

Prerequisites for wordpress

For installation of wordpress firstly we need to install LAMP stack on centos 7 You can use following post to learn

How to install LAMP on Centos 7

So, After installing LAMP Stack we can continue installing our wordpress..

Step 1: Download wordpress

First thing we need to do is to download latest version of wordpress in our web server, for downloading you can go to wordpress website https://wordpress.org/download/  or use following wget command to download wordpress version 4.4:

wget https://wordpress.org/latest.tar.gz

This command will download latest wordpress.

You might also like: How to install joomla on centos 7

Step 2: Extract wordpress

Next thing we need to do is extract wordpress in our /var/www/html directory use following command to extract

tar zxvf latest.tar.gz /var/www/html

Now move the content from wordpress directory to /var/www/html

cd wordpress
mv * /var/www/html/

Step 3 : Create database

Now we need to create database for our wordpress website so lets get login to MariaDB, login with your rrot root user and password which we have set in last tutorial of LAMP stack

mysql -u root -p

Now we will create a database for wordpress and the name of the database is ‘wordpress’

create database wordpress;

After creating database i am creating a mysql user ‘user’ and giving it a password ‘password’ as this user and pasword is for example so create a secure user and password for your environment

CREATE USER user@localhost IDENTIFIED BY 'password';

Now we have created a new user with its password and we need to give access of database to our new user so lets give access to the user

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

Now we have provided privileges to user we need let know MySQL about the changes by the following command

FLUSH PRIVILEGES;

Now exit from MySQL command prompt

exit

Consider reading: How to install drupal 7 on centos 7

Step 4: Configure wordpress

now move to wordpress installation directory

cd /var/www/html

Now main database configuration file of wordpress is wp-config.php we need to configure it according to our  settings as belows:

cp wp-config-sample.php wp-config.php
vim wp-config.php

 

// ** MySQL settings - You can get this info from your web host ** //
/** The name of the database for WordPress */
define('DB_NAME', 'wordpress');
/** MySQL database username */
define('DB_USER', 'user');
/** MySQL database password */
define('DB_PASSWORD', 'password');

Step 5: Complete our installaltion

Now go to ip address of our server

http://serveripaddress/

You will see the first page where you need to select language click continue and you will get this page. Fill out all the information according to your need

After finishing Click on Install WordPress , Then wordpress will ask you to login

Now use your credentials for login and hit Login

 

After Login you will get the dashboard of the wordpress, It means you have successfully installed wordpress.

Now wordpress is up and running on your server..

If you got any problem using this tutorial feel free to comment below..

Want us to do it for you..?

If you want we will install it for you on your real linux server for your production, contact us on chetan@installvirtual.com  with your requirement and we will do it for you..

 

Exit mobile version