Install WordPress 5 with Apache, MariaDB 10 and PHP 7 on CentOS 7

Best Affordable Linux and WordPress Services For Your Business
Outsource Your Linux and WordPress Project and Get it Promptly Completed Remotely and Delivered Online.

If You Appreciate What We Do Here On TecMint, You Should Consider:

  1. Stay Connected to: Twitter | Facebook | Google Plus
  2. Subscribe to our email updates: Sign Up Now
  3. Get your own self-hosted blog with a Free Domain at ($3.45/month).
  4. Become a Supporter - Make a contribution via PayPal
  5. Support us by purchasing our premium books in PDF format.
  6. Support us by taking our online Linux courses

We are thankful for your never ending support.

Ravi Saive

I am Ravi Saive, creator of TecMint. A Computer Geek and Linux Guru who loves to share tricks and tips on Internet. Most Of My Servers runs on Open Source Platform called Linux. Follow Me: Twitter, Facebook and Google+

Your name can also be listed here. Got a tip? Submit it here to become an TecMint author.

RedHat RHCE and RHCSA Certification Book
Linux Foundation LFCS and LFCE Certification Preparation Guide

You may also like...

44 Responses

  1. Fede says:

    Followed each step, but then WordPress has no permission to edit files, like editing the htaccess, or updating, etc.

    I tried some suggestions I found over the internet, either a plugin (All in one WordPress security) but still can’t make it work.

    Any idea?

  2. asenka says:

    Hi Ravi, Thank you for the manual. It is very comprehensive and useful. Can you extend a little bit the instructions to cover the ssl. It should be good if you show a way to protect the wp-admin with ssl

  3. Rune Mariboe says:

    Couldn’t install plugins, ended up granting apache ownership to wordpress directory. That did fix the issue but I’m uncertain of security implications.

    Also needed PHP7 because of some plugin so ended up redoing installation with the following:

    # yum install epel-release yum-utils
    # yum install
    # yum-config-manager --enable remi-php72
  4. photron says:

    For RHEL 7, step one is missing this command that must be executed BEFORE ‘mysql_secure_installation:’

    # systemctl start mariadb && systemctl enable mariadb

    Otherwise, the following error is encountered:

    ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)

  5. Andy Caroll says:

    I see many error in error log

    017/03/31 18:06:16 [crit] 19398#0: *1220 connect() to unix:/tmp/php_fpm.sock failed (2: No such file or directory) while connecting to upstream, client:, server:, request: "GET / HTTP/1.1", upstream: "fastcgi://unix:/tmp/php_fpm.sock:", host: ""

  6. Mukesh says:

    Thanx to save my time install configure its done grate job.

  7. Jonthue Michel says:

    On where it says ## Grant Privileges to Database ##
    GRANT ALL ON wordpress.* TO [email protected];

    On the 2nd line where it mentioned wordpress twice, does that mean your giving user: wordpress rights to database wordpress? or is it the [email protected]?

    • Ravi Saive says:


      Yes you correct, we’ve giving privileges to user ‘wordpress’ on database ‘wordpress’..

  8. Sathishkumar says:

    admin console gui not working. showing only texts only. Any help on this?

    • Sathishkumar says: – login page -> ok
      after login, there is not graphics /images. only text are shown. Hard to manage the wordpress. Kindly help me to resolve this problem

  9. Stephen says:

    Hellpo there! Thiss is my 1st comment here so I just wanted
    to give a quick shout out and tell you I really enjoy reading through your articles.
    Cann you recommend anny otyher blogs/websites/forums that deazl with the same subjects?
    Thanks for your time!

  10. WP Plugins says:

    Hi Ravi,

    I followed every step but nothing seems to work. The default Nginx greeting is still displayed at localhost:80. Could you show me a way out?

Leave a Reply to Stephen Cancel reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.