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

Share this Article :

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 :

[[email protected] html]# pwd

2. Download the WordPress :

[[email protected] html]# wget

3. Extract the lates.tar.gz files :

[[email protected] 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 :

[[email protected] ~]# 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 [email protected];
Query OK, 0 rows affected (0.00 sec)

mysql> SHOW GRANTS FOR 'wpuser'@'localhost';
| Grants for [email protected]                                                                                   |
| 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 :

[[email protected] ~]# chmod o+wx /var/www/html/wordpress/

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


Also Read :   How to Monitor and Configure a Windows Server Using Nagios

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 :

[[email protected] ~]# 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.

[[email protected] ~]# chmod 755 /var/www/html/wordpress/

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

Also Read :   How to Install GForge Advanced Server on CentOS 5.5 Server

Normal usercan access the blog using the following URL :

One Response

  1. KMAC

Leave a Reply