Install WordPress 4.0 on Fedora 20/19, CentOS/RHEL 7/6.5/5.10

This is guide, howto install WordPress 4.0 with Nginx or Apache on Fedora 20/19/18, CentOS 7/6.5/5.10 and Red Hat (RHEL) 7/6.5/5.10 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 5.5/10 database server or Mysql 5.5 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

[Apache]

1.1a Install the whole LAMP environment with following guide

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

[Nginx]

1.1b Install the whole LEMP environment with following guide

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

OR

[Apache]

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

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

[Nginx]

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

  1. Install MariaDB 5.5 on Fedora, CentOS, Red Hat (RHEL)
  2. Install MySQL 5.5 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.0 on Fedora 20/19/18, CentOS/Red Hat (RHEL) 7/6.5/5.10

2.1 Change root user

2.2 Download WordPress 4.0 / latest

[Apache]

2.3a Untar/Extract Downloaded WordPress Package

[Nginx]

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

[Apache]

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:

Reload Apache (httpd)

[Nginx]

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:

[Apache]

4.3a Create wp-config.php

[Nginx]

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:

Output:

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/.

Select language

WordPress 4.0 Select Language

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.0 Welcome Screen and Dashboard

WordPress 4.0 Dashboard

5.3 WordPress 4.0 Blog with Twenty Fourteen Template version 1.0

WordPress 4.0 Twenty Fourteen Template

Share this post

115 Comments

  1. 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

    Reply
  2. 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…

    Reply
    • 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?

      Reply

Trackbacks/Pingbacks

  1. Install Wordpress 3.0.1 on Fedora 13, CentOS 5.5, Red Hat (RHEL) 5.5/6 | WP Themes and Plugins - [...] is the original post:  Install Wordpress 3.0.1 on Fedora 13, CentOS 5.5, Red Hat (RHEL) 5.5/6 Most Related PostsHowTo …
  2. wp-popular.com » Blog Archive » Install Wordpress 3.0.1 on Fedora 13, CentOS 5.5, Red Hat (RHEL) 5.5/6 - [...] is the original post: Install Wordpress 3.0.1 on Fedora 13, CentOS 5.5, Red Hat (RHEL) 5.5/6 Tags: centos, fedora, …

Submit a Comment

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

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">