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. Adam says:

    I know it’s in there somewhere, but I have no idea how to access my wordpress installation. I can’t FTP yet for some reason and I am too dumb to know how to get that to work. I may have to throw in the towel on this.

  2. Ravi Saive says:

    @ Adam,

    You have used wrong (comma) in the following line. that’s the reason you getting syntax error.

    define(‘DB_NAME’, ‘MY_DATA_BASE_NAME’);

    Use this following line with proper commas used. it will work..

    define(‘DB_NAME’, ‘MY_DATA_BASE_NAME’);

    • Adam says:

      @Ravi Slaive

      Thank you for your help, but inputting the correct commas (Is saw the slight difference) still did not work. I input this:

      define(‘DB_NAME’, ‘MY_DATA_BASE_NAME’);

      Still get this:

      -bash: syntax error near unexpected token `’DB_NAME’,’

      • Ravi Saive says:

        The error itself telling that you have used wrong commas


        it should be ’DB_NAME’,

        Why not you copy my whole configuration of Step5 and then modify it.

        • Adam says:

          Forgive me for my ridiculous amount of n00bness on this. But what comma is there other than the one next to the enter key? I’m on a Mac in the default Terminal app if that helps. All I see is this one:

          All Terminal will do is this one:

          But I copy and pasted your edits and still get errors:

          define(’DB_NAME’, ’MY_DATA_BASE_NAME’);
          -bash: syntax error near unexpected token `’DB_NAME’,’

  3. Adam says:

    I am on a LEMP install. I followed your LEMP install to a T on my CentOS server. I am literally stuck on the very last step before going into wordpress. When I type this in:

    define(‘DB_NAME’, ‘MY_DATA_BASE_NAME’);

    I get the following error:

    -bash: syntax error near unexpected token `’DB_NAME’,’

    I am a n00b, and a frustrated one.

  4. Josh Maggart says:

    Great article! Thanks so much for sharing. However I am receiving a 404 error when browsing to I added the wordpress to /etc/hosts and it’s still no good. I had been following this tutorial, to install the server and had to stop before installing courier imap, so I thought I would install WordPress. Hopefully someone can give me pointers on what I may have missed. Thanks!

  5. Sreekanth says:

    It is very good article I have followed the same steps to configure wordpress in Fedora 17 with nginx. But it is not working for me . Couldn’t resolve the name wordpress when I am trying to access it via browser. Please help

    • Ravi Saive says:


      To resolve hostname just add the following line to your /etc/hosts file. wordpress

      and try browsing again. it should work on all browsers. if it doesn’t work you need to look into other things.

  6. Great artical, I unfortunately had some problems printing this artcle out, The print formating looks a little screwed over, something you might want to look into.

    • Ravi Saive says:

      Dear Chaussures.

      Thanks for point out we will work on this soon and give a option to print and view pdf option..

  7. seo prices says:

    great read, I’ll be sharing the information

  8. Sell Cisco says:

    Nice post. I used to be checking continuously this blog and I am impressed! Extremely helpful information particularly the last section :) I care for such info much. I was seeking this particular information for a long time. Thanks and good luck.

  9. Hello, i believe that i noticed you visited my blog thus i came to return the favor?.I’m trying to to find issues to enhance my site!I suppose its good enough to use some of your ideas!!

  10. I am no longer positive where you’re getting your information, however good topic. I must spend a while finding out much more or working out more. Thanks for fantastic information I was in search of this info for my mission.

Got something to say? Join the discussion.

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.