Install WordPress 4.1.1 on Fedora 21/20, CentOS/RHEL 7/6.6/5.11

This is guide, howto install WordPress 4.1.1 with Nginx or Apache on Fedora 21/20/19, CentOS 7/6.6/5.11 and Red Hat (RHEL) 7/6.6/5.11 servers. WordPress needs web server with PHP and MariaDB or MySQL database. This guide uses Apache web server with PHP 5.6 or Nginx web server with PHP 5.6 (PHP-FPM) and MariaDB 10/5.5 database server or Mysql 5.6 database server.

If you want to install WordPress with Apache then use a – [Apache] sections and if you want install WordPress with Nginx then use b – [Nginx] sections.

1. Install Needed Web and Database Servers


1.1a Install the whole LAMP environment with following guide

LAMP (Linux/Apache/MySQL/PHP) on Fedora, CentOS/Red Hat (RHEL)


1.1b Install the whole LEMP environment with following guide

LEMP (Linux/Nginx/MySQL/PHP) on Fedora, CentOS/Red Hat (RHEL)



1.2a Install just MariaDB or MySQL and Apache with PHP using following guides

  1. Install MariaDB 10/5.5 on Fedora, CentOS, Red Hat (RHEL)
  2. Install MySQL 5.6 on Fedora, CentOS, Red Hat (RHEL)
  3. Install Apache (httpd) and PHP 5.6 on Fedora, CentOS, Red Hat (RHEL)


1.2b Install just MariaDB or MySQL and Nginx with PHP (PHP-FPM) using following guides

  1. Install MariaDB 10/5.5 on Fedora, CentOS, Red Hat (RHEL)
  2. Install MySQL 5.6 on Fedora, CentOS, Red Hat (RHEL)
  3. Install Nginx and PHP 5.6 (PHP-FPM) on Fedora, CentOS, Red Hat (RHEL)

2. Install WordPress 4.1.1 on Fedora 21/20/19, CentOS/Red Hat (RHEL) 7/6.6/5.11

2.1 Change root user

2.2 Download WordPress 4.1.1 / latest


2.3a Untar/Extract Downloaded WordPress Package


2.3b Create needed directories, set permissions and untar/Extract Downloaded WordPress Package

Note: I use apache user and group here, because PHP-FPM runs as apache default (apache Choosed to be able to access some dir as httpd). If you use some other user on your php-fpm conf then change this accordingly.

3. Create MariaDB/MySQL Database for WordPress

3.1 Connect MariaDB/MySQL Database as root

3.2 Setup MariaDB/MySQL Database for WordPress

4. Setup WordPress


4.1a Create Apache VirtualHost for WordPress

This is simple VirtualHost setup for local usage. VirtualHost is not mandatory for WordPress installation.
Add following to /etc/httpd/conf.d/wordpress.conf file:

Restart Apache (httpd)


4.1b Create Nginx VirtualHost for WordPress

Create sites-available and sites-enabled directories

Include sites-enabled
Add following lines to /etc/nginx/nginx.conf file, after “include /etc/nginx/conf.d/*.conf” line (inside http block).

Create Nginx wordpress virtual host file
Add following content to /etc/nginx/sites-available/wordpress file. This is basic Nginx virtual host config file for wordpress.

Create symlink on sites enabled directory

Restart Nginx server

4.2 Set wordpress pointing to localhost (or some other host)

Add following to /etc/hosts file:


4.3a Create wp-config.php


4.3b Create wp-config.php

4.4 Configure WordPress wp-config.php file

Open wp-config.php with text editor.

Setup at following database settings (which was created in section 3.2)

Insert some unique data on following section

Generate unique phrases using pwgen
Install pwgen:

Generate phreses with pwgen:


Then simply use these generated phrases on WordPress config file. Remember remove or replace all quotation marks.

Check/Setup following parameters if needed:

Save wp-config.php file!

This guide example wp-config.php could look following

4.5 Finnish WordPress Configuration with Browser

Open browser and Goto following address http://wordpress/.

Setup Basic WordPress Blog Data and Create Admin User

WordPress 4.0 Setup Basic WordPress Blog Data and Create Admin User

WordPress Installation Completed

WordPress 4.0 Installation Success

5. Use WordPress

5.1 WordPress Log In

WordPress 4.0 Login

5.2 WordPress 4.1.1 Welcome Screen and Dashboard

WordPress 4.1.1 on Fedora 21

5.3 WordPress 4.1.1 Blog with Twenty Fifteen Template

WordPress 4.1.1 Twenty Fifteen Theme

Share this post


  1. Thanks for the step-by-step instructions – this will save me a lot of time and frustration on my next wordpress install!

  2. Hi Team,
    Yesterday i have configured wordpress on the centos6.6 and after change setting of dashboard like URL setting and domain setting it is not accessing.

    and also i am not able to access in Lan network, what should i change for lan network access.

    Please hemp mee

    • Hi varun,

      So you WordPress installed, but you can’t access it?

      Could you post your Apache or Nginx server config (virtual host) for this wordpress installation?

  3. Hi. I have WordPress installed and I can login to the admin. However, I am unable to a) Update WordPress, b) upload media, and c) install plugins. Clearly a permissions issue, so I tried

    so that apache has write access for the directory. Then double-checked my httpd.conf file and everything looked fine. Restarted apache and the mysql daemon, logged back into the WordPress admin and tried to run updates and install plugins etc and I got this message:

    The update cannot be installed because we will be unable to copy some files. This is usually due to inconsistent file permissions.: wp-admin/includes/update-core.php

    Odd because I didn’t change any file permissions. That’s went I went searching for a solution and stumbled upon your article. Read through some of the other comments above, tried a couple of their solutions and still no luck. Frustrating as I’ve never had this issue with WordPress on other linux distros. Also hesitant to mess with the selinux configuration (which might be the problem).

    Localhost Details: Fedora 20 LAMP stack

    • I have exactly the same problem. What a pity

      • Well, I solved it:

        You must add these lines

        define(‘DISALLOW_FILE_MODS’, false);
        define(‘AUTOMATIC_UPDATER_DISABLED’, false);

        before the line

        /* That’s all, stop editing! Happy blogging. */

        in wp-config.php

  4. Hi JR,

    Thanks a lot for this step to step tutorial and the time you take to answer all the questions, it helps a lot.
    Like rowbust I’ve been reading a lot of comments and tried some solutions, but unfortunately I wasn’t more lucky.

    I’ve installed wordpress on Centos with apache.
    I can reach wordpress, but wp-admin/plugins.php and wp-admin/themes.php are not working (browser error message : no data received with chrome)
    My log isn’t showing anything..

    I tried

    I also gave the correct rights to wordpress directory and subdirectories.

    I’ve added an .htaccess file

    this is my wordpress.conf

    Any idea of what I’m doing wrong?
    Sorry if it’s a little bit muddled…

    • Hi Steeve,

      A few things that came to my mind.

      Did you tested it with any other browsers? (Just make sure, that it’s not problem with browser)

      Did you checked wordpress-error_log, wordpress-access_log and httpd logs?

      Do you have SELinux enabled? If yes, could you also check /var/log/audit/audit.log?

  5. Database Error
    Error establishing a database connection

    following step by step Your guide that’s the result on my box… I use fedora 24.


Submit a Comment

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