Install WordPress on CentOS 6.3

Steps of installing WordPress on CentOS 6.3 minimal installation.

1) Install prerequisite packages.

[root@CentOS ~]# yum -y install php php-mysql mysql* wget unzip


2) Download the latest version of WordPress.

[root@CentOS ~]# wget
[root@CentOS ~]# unzip
[root@CentOS ~]# mv wordpress/ /var/www/html/

3) Configure mysql database server.

[root@CentOS ~]# service mysqld start
[root@CentOS ~]# mysql -u root –p

mysql>  CREATE DATABASE wordpress;
mysql> GRANT ALL PRIVILEGES ON wordpress.* TO “wordpress”@”localhost” IDENTIFIED BY “wordpress”;
mysql> exit

Test the newly created wordpress user
[root@CentOS ~]# mysql -u wordpress -p


4) Configure the mysql DB connection info in wordpress configuration file.

[root@CentOS html]# cd /var/www/html/wordpress/
[root@CentOS wordpress]# cp wp-config-sample.php wp-config.php

Edit wp-config.php file, the secret key be obtained from


5) Configure the WordPress virtual directory in Apache.

[root@CentOS html]# vi /etc/httpd/conf/httpd.conf

# WordPress home folder
Alias /wp/ “/var/www/html/wordpress/”
<Directory “/var/www/html/wordpress”>
Order allow,deny
Allow from all

[root@CentOS wordpress]# service httpd restart

6) Go to the WordPress configuration page – http://centos/wp/wp-admin/install.php




Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s