Installing WordPress Step 1A: Installing the WordPress Directory Using yum on Linux (CentOS 6)

This post is part of a step-by-step series on installing WordPress on Linux (CentOS 6)

I always prefer to install things using a package manager like yum (for RHEL and CentOS), instead of installing manually so I can avoid having to worry about dependencies. Furthermore it makes uninstalling much easier. Installing WordPress is no exception, luckily it can be done using yum. However if you wish to install it directly without yum then check here


The official requirements are as follows:

  1. PHP version 5.2.4 or greater
  2. MySQL version 5.0 or greater

If you wish to install these separately you may do so using the following tutorials:

  1. Installing different versions of php
  2. Installing the latest version of MySQL

However, the beauty of yum is it should resolve these dependencies for you. First we need to find a repo that has WordPress.

EPEL: A Repo that has WordPress

Choose your OS here. I will be installing on CentOS 6:

[ahmed@amayem ~]$ sudo rpm -Uvh

Check here to see how to give a linux user sudo powers.

Checking the WordPress Version:

[ahmed@amayem ~]$ yum info wordpress

Gives us the following:

Name        : wordpress
Arch        : noarch
Version     : 3.9.2
Release     : 3.el6

At the time of installation this was the most recent version.


As always with yum this is very easy:

[ahmed@amayem ~]$ sudo yum install wordpress

Check that all the dependencies are being installed. Make sure you are happy with the versions of both php and MySQL. If you are unhappy then check these tutorials to show you which repos you need to install to get the latest versions:

  1. Installing different versions of php
  2. Installing the latest version of MySQL

As always with the prompts enter y, and it should end with the following:


Important Documentation

When looking at the info for the wordpress as follows:

[ahmed@amayem ~]$ yum info wordpress

There is an important statement at the end:

: Important information in /usr/share/doc/wordpress-3.9.2/README.fedora

Let’s take a look:

[ahmed@amayem ~]$ cat /usr/share/doc/wordpress-3.9.2/README.fedora

We will find some more documentation on how to continue including the following important directories:

Important Files and Directories

Config File

The README.fedora file had this line:

Next, you need to edit your /etc/wordpress/wp-config.php file

So now we know that the config file is located at, /etc/wordpress/wp-config.php. Let’s take a look at it:

WP Base Directory

[ahmed@amayem ~]$ cat /etc/wordpress/wp-config.php
cat: /etc/wordpress/wp-config.php: Permission denied

We are missing the sudo:

[ahmed@amayem ~]$ cat /etc/wordpress/wp-config.php

Near the bottom we will see the following:

/** Absolute path to the WordPress directory. */
if ( !defined('ABSPATH') )
    define('ABSPATH', '/usr/share/wordpress');

Now we know that the base directory is at /usr/share/wordpress. Let’s visit it:

[ahmed@amayem wordpress]$ ls
index.php             wp-config-sample.php  wp-login.php
wp-activate.php       wp-content            wp-mail.php
wp-admin              wp-cron.php           wp-settings.php
wp-blog-header.php    wp-includes           wp-signup.php
wp-comments-post.php  wp-links-opml.php     wp-trackback.php
wp-config.php         wp-load.php           xmlrpc.php

Missing Functionality

There is a caution mentioned at the end of the yum info of the package:

WordPress ships with Flash and Silverlight plugins for the 'plupload' file uploader and the 'mediaelement' media player embedder. The idea is to try and be able to provide a multi-file uploader and an embedded video player when HTML5 is not available (or does not support the video format in question). These plugins are provided as pre-built binaries and there is no mechanism for building them from source during WordPress compilation. As the inclusion of pre-built binaries is against Fedora policy - see - these plugins have been removed from the Fedora package. As a consequence:

a) any WordPress element or plugin that uses the 'plupload' will only present an HTML5-based multi-file uploader if HTML5 is supported by the user's browser or an HMTL4-based single-file uploader in HTML5 is not supported. No Flash or Silverlight-based multi-file uploader will be provided.

b) If you try to embed media into a WordPress post using the  and  short tags, the media player will be visible if the reader is using a browser that has HTML5 support for the media format in question; if not, the 'Download Media' link will be offered. No Flash or Silverlight-based player element will be included.

So it will be missing these things, if this is OK with you then continue otherwise we will have to install manually without using yum.

Next Steps

  1. Setting Up MySQL Database
  2. Updating wp-config.php with Database Settings and Security Keys
  3. Deciding the Site Root Directory and Moving Files there
  4. Running the WordPress php Install Script


  1. Official WordPress Installation Codex Installation

Ahmed Amayem has written 90 articles

A Web Application Developer Entrepreneur.