How to Install WordPress Blog on Linux CentOS 6 / RHEL 6

How to Install WordPress Blog on LinuxThis article will explain the steps on how to install WordPress blog on Linux CentOS 6, Redhat Enterprise Linux 6 (RHEL 6) and Oracle Linux 6. WordPress is an open-source blogging platform. It’s a free blogging tool and content management system (CMS) based on PHP and MySQL. Follow this howto guides to install the WordPress on RHEL 6. This post assumed that apache and mysql has been setup on this server. If not, proceed to the following Apache and MySQL installation howto :

How to Install Apache Httpd Server on RHEL 6
How to Install MySQL Server on RHEL 6

Steps to Install WordPress Blog on Linux

1. Make sure you are on the DocumentRoot directory where you will put the wordpress files :

[root@rhel6 html]# pwd

2. Download the WordPress :

[root@rhel6 html]# wget

3. Extract the lates.tar.gz files :

[root@rhel6 html]# tar xzvf latest.tar.gz

4. Proceed to create the database for WordPress. On your server, try to create a new (empty) MySQL database for WordPress (For example, you can call it “wpdb”. If your the newbie, you can follow this basic steps to create a new database and assign a user and it’s permission :

[root@rhel6 ~]# mysql -u root -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 5.1.47 Source distribution

Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
This software comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to modify and redistribute it under the GPL v2 license

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> CREATE DATABASE wpdb;
Query OK, 1 row affected (0.00 sec)

mysql> CREATE USER 'wpuser'@'localhost' IDENTIFIED BY 'wppassword';
Query OK, 0 rows affected (0.00 sec)

mysql> GRANT ALL PRIVILEGES ON wpdb.* to wpuser@localhost;
Query OK, 0 rows affected (0.00 sec)

mysql> SHOW GRANTS FOR 'wpuser'@'localhost';
| Grants for wpuser@localhost                                                                                   |
| GRANT USAGE ON *.* TO 'wpuser'@'localhost' IDENTIFIED BY PASSWORD '*977FDAC11B3F74324912DA4F9D489A3E6D59B281' |
| GRANT ALL PRIVILEGES ON `wpdb`.* TO 'wpuser'@'localhost'                                                      |
2 rows in set (0.00 sec)

5. Make wordpress folder writable, otherwise you will not able to create config.php during the installation :

[root@rhel6 ~]# chmod o+wx /var/www/html/wordpress/

6. Run the installation script on your server. Go to the following address in your web browser :

See also  How to Uninstall WordPress on Ubuntu


7. Click “Create Configuration File” :
8. Click “Let’s Go!” :
9. Enter “Database Name“, “User Name” and “Password“. Click “Submit” to proceed :
10. Click “Run the Install” to proceed :
11. Provide the blog information. You can change it later :
12. WordPress has been successfully installed on your RHEL 6 server :

13. For security reason, remove the writable access to wordpress root folder :

[root@rhel6 ~]# chmod o-wx /var/www/html/wordpress/

14. Assigned the secure permission for wordpress root folder. 755 means read and execute access for everyone and also write access for the owner of the file.

[root@rhel6 ~]# chmod 755 /var/www/html/wordpress/

15. As a blog administrator, you can login to the wordpress dashboard using this URL:

See also  How to Setup Multiple Wordpress Sites on Nginx

Normal usercan access the blog using the following URL :


1 Comment

Leave a Reply

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