How to Setup WordPress Blog on CentOS 6.3

WordPress is an open-source blogging platform. It’s a free blogging tool and content management system (CMS) based on PHP and MySQL. This steps covers how to install the WordPress on linux CentOS 6.3. This post assumed that PHP, apache and MySQL server has been setup properly.

1. Login as a root, go to document’ root folder and download latest wordpress file :

[root@centos63 ~]# cd /var/www/html/
[root@centos63 html]# wget http://wordpress.org/latest.tar.gz

2. Extract the lates.tar.gz files to current directory :

[root@centos63 html]# tar xvzf latest.tar.gz

3. Now create wordpress database. Login to your mySQL database :

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

Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

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

4. Create Database name “wordpressdb” :

mysql> CREATE DATABASE wordpressdb;
Query OK, 1 row affected (0.08 sec)

5. Create user “wordpressuser” with password “wordpresspassword” :

mysql> CREATE USER 'wordpressuser'@'localhost' IDENTIFIED BY 'wordpresspassword';
Query OK, 0 rows affected (0.06 sec)

6. Grant all privileges to “wordpressdb” to user ” wordpressuser” from localhost access :

mysql> GRANT ALL PRIVILEGES ON wordpressdb.* to wordpressuser@localhost;
Query OK, 0 rows affected (0.04 sec)

7. Check and verify the granted access for user “wordpressuser” :

mysql> SHOW GRANTS FOR 'wordpressuser'@'localhost';
+----------------------------------------------------------------------------------------------------------------------+
| Grants for wordpressuser@localhost                                                                                   |
+----------------------------------------------------------------------------------------------------------------------+
| GRANT USAGE ON *.* TO 'wordpressuser'@'localhost' IDENTIFIED BY PASSWORD '*E62D3F829F44A91CC231C76347712772B3B9DABC' |
| GRANT ALL PRIVILEGES ON `wordpressdb`.* TO 'wordpressuser'@'localhost'                                               |
+----------------------------------------------------------------------------------------------------------------------+
2 rows in set (0.08 sec)

mysql>

8. For higher security, make wordpress folder readable only from browser :

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

9. Go to your web server terminal or ssh to web server. Copy and rename wp-config-sample.php to wp-config.php:

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

10. Modify the wp-config.php :

[root@centos63 ~]# vi /var/www/html/blog/wp-config.php

Change below database details such as database’ name, database’ username, database’ password nand database’ hostname.

// ** MySQL settings - You can get this info from your web host ** //
/** The name of the database for WordPress */
define('DB_NAME', 'wordpressdb');

/** MySQL database username */
define('DB_USER', 'wordpressuser');

/** MySQL database password */
define('DB_PASSWORD', 'wordpresspassword');

/** MySQL hostname */
define('DB_HOST', 'localhost');

11. To configure wordpress, navigate the browser to http://servername/wordpress/. Please complete the form Click “Install WordPress”

See also  How to Listen Radio Online Free

Site Title : Blog Title
Username : Prefered username
Password, twice : Your password
Your E-mail : Your Email

wordpress

12. To login, navigate the browser to http://servername/wordpress/wp-login.php :
wordpress

How to Reset the Directory Manager Password on RHEL 7 / CentOS 7
How to Reset the Directory Manager Password on RHEL 7 / CentOS 7

It is best practice to remember passwords, but because too many passwords, sometimes we forget. We are not encouraged to write the password on any paper or share the password...

How to Find Big Files Size on Linux RHEL/CentOS
How to Find Big Files Size on Linux RHEL/CentOS

As the linux administrator, sometimes we have to identify which files are most take much space in the linux server resulting in low free space. Low disk space can also...

Why Linux users should worry about malware and what they can do about it
Why Linux users should worry about malware and what they can do about it

Don’t drop your guard just because you’re running Linux. Preventing the spread of malware and/or dealing with the consequences of infection are a fact of life when using computers. If...

How to Reset Forgotten Root Password on Linux RHEL 7 / CentOS 7
How to Reset Forgotten Root Password on Linux RHEL 7 / CentOS 7

This short howto will explain the steps to reset a lost root password or to reset a forgotten root password on Linux RHEL 7 or CentOS 7. Basically, we will...

How to Update CentOS or Upgrade CentOS to the Latest Version
How to Update CentOS or Upgrade CentOS to the Latest Version

Recently, the latest version of CentOS 7.3 was released. All users of CentOS 7.0, 7.1 and 7.2 can upgrade their system to the most recent. This quick guide will explain...

How to Change your WordPress Username, Nickname and Display Name in MySQL
How to Change your WordPress Username, Nickname and Display Name in MySQL

After you create an account log in WordPress, you may want to change your WordPress username, as appropriate or due to security reason. However, you can not do this from...

How to Enable SSH Root Login on Ubuntu 16.04
How to Enable SSH Root Login on Ubuntu 16.04

As what we wrote in the previous article on how to allow SSH root on Ubuntu 14.04, after installing a fresh new copy of Ubuntu 16.04 LTS, we find that...

How to Change UUID of Linux Partition on CentOS 7
How to Change UUID of Linux Partition on CentOS 7

UUID (Universally Unique IDentifier) should be unique and it is used to identify storage devices on a linux system. If you cloned a virtual machine from vCenter, the metadata containing...

4 Comments

  • Avatar for Joseph Donahue Joseph Donahue says:

    I’m surprised you didn’t mention joining travel blog success like all the other bloggers do – which is impressive! I love how you personality just shows through your delicate writing! I started blogging about my travel experience recently as well, but I am a photographer and I have my name as the domain for my portfolio site – so I just built a blog page on top of what I already have – I’m still debating if I should just create a separate domain for blogging or just keep it as is.

  • Avatar for Kelly Hubbard Kelly Hubbard says:

    I actually started another blog in wordpress and I highly recommend it because of its graphics and visuals. I am having trouble though with domain and hosting because I can’t afford maintenance, yet being a student. But I will surely come back to this once I get my own website done. This is really helpful for me!

  • Avatar for Holly Hooper Holly Hooper says:

    I am so glad I found your post on pinterest! I have been flirting with the idea of starting a blog to develop my writers platform online. However, I am a bit lost on how to do that; your post has helped me. I also might look into your consulting services if I get in a jam later on. Great post! Thanks for posting!

  • Avatar for Akshay Akshay says:

    WordPress is the best recommendations CMS for blogger, e-commerce websites etc and the best part, with the bunch of themes and plugins, you can create website with ease.

    We need to move on Centos7 installation as Centos 6 is already dead at end of life

Leave a Reply

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