LAMP “Word Press on CentOS 6.4” and Cent OS 7

LAMP with WordPress on CentOS 6.4

This howto is about Setting Up Apache, MySql, PHP and Hosting a WordPress blog on CentOS 6.4

Please follow the below steps to install the above:

1. Intall Apache, Mysql and php on Centos

# yum -y install httpd mysql-server php <—
Also install
# yum -y install php-mysql php-gd php-mbstring

2. Download and extract word press and move to appropriate location.

e.g  wget

Now Extract Word press

# tar xzvf wordpress.tar.gz   <—

Now copying wordpress/ folder to /var/www/html/ Directory

# cp -R wordpress/ /var/www/html/   <–

Now Setting up Database for wordpress

# mysql -u root <—

Creaing a user sal with password of

mysql>create user sal@localhost identified by “”;

mysql> create database wordpress; <—-

mysql> grant all privileges on wordpress.* to sal@localhost;

mysql>flush privileges;

mysql> exit

Now we need to configure WordPress

Create wp-config.php
# cd /var/www/html/wordpress
# cp wp-config-sample.php wp-config.php

Now we will edit wp-config.php


define(‘DB_USER’, ‘sal’);

define(‘DB_HOST’, ‘localhost’);

Save and Quit

and Now Restart HTTPD

# service httpd restart   <—

Now go to http://<yourip>/wordpress/wp-admin/install.php and follow the setup.

Please do comment
Salman Aftab