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 http://wordpress.org/wordpress.tar.gz

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 itpings.com

mysql>create user sal@localhost identified by ‘itpings.com’;

mysql> create databases 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_NAME’,’wordpress’);

define(‘DB_USER’, ‘sal’);

define(‘DB_PASSWORD’,‘itpings.com’);
define(‘DB_HOST’, ‘localhost’);

Save and Quit

and Now Restart HTTPD

# service httpd restart   <—

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

Please do comment
Thanks,
Salman Aftab

www.itpings.com