How to Install WordPress 4.9 On Ubuntu 16.10/16.04 Using LAMP Stack

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.

Aaron Kili

Aaron Kili is a Linux and F.O.S.S enthusiast, an upcoming Linux SysAdmin, web developer, and currently a content creator for TecMint who loves working with computers and strongly believes in sharing knowledge.

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

150 Responses

  1. callum says:

    It seems your syntax is incorrect I copy and paste from your line:

    define(‘DB_NAME’, ‘database_name_here’); /** MySQL database username */ define(‘DB_USER’, ‘username_here’); /** MySQL database password */ define(‘DB_PASSWORD’, ‘password_here’); /** MySQL hostname */ define(‘DB_HOST’, ‘localhost’); /** Database Charset to use in creating database tables. */ define(‘DB_CHARSET’, ‘utf8’); /** The Database Collate type. Don’t change this if in doubt. */ define(‘DB_COLLATE’, ”);

    replace as you suggest but get the following error for all the entries

    ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘define(‘DB_COLLATE’, ”)’ at line

    • Aaron Kili says:


      Please, open the file wp-config.php:
      $sudo vi wp-config.php

      Then change the settings(database name, user, user password, host etc…) according to your database server configurations.

  2. callum says:

    Great tutorial until i get to the section “then update it with your database information under the MySQL settings section (refer to the highlighted boxes in the image below):”

    I am sitting looking at command prompt how do i do the next section?

  3. Frank says:

    Very helpful, many thanks…

  4. Felipe Cabral says:

    Nice post. It was so helpful to me. Thanks so much for shared your knowledge

  5. Tom M says:

    So I followed the instructions and when I try to go to localhost I get a blank page. But the source for the page is as follows.

     * Front to the WordPress application. This file doesn't do anything, but loads
     * wp-blog-header.php which does and tells WordPress to load the theme.
     * @package WordPress
     * Tells WordPress to load the WordPress theme and output it.
     * @var bool
    define('WP_USE_THEMES', true);
    /** Loads the WordPress Environment and Template */
    require( dirname( __FILE__ ) . '/wp-blog-header.php' );

    What did I do wrong?

  6. Ravi Kumar says:

    I’m new to the Linux OS and able to install my first php library i.e wordpress by myself. super easy to use instruction. Please keep up the good work.

    Many Thanks

    • Aaron Kili says:


      Welcome, thanks for the kind words of appreciation. We always intend to offer simple, easy-to-follow and useful instructions in out guides, for Linux users with a special consideration for newbies.

  7. srk says:

    very good explaination

  8. says:

    Nice! thank you. just got WordPress installed on my new Mint server in Virtual Box on my MacBook pro

  9. Matt says:

    Hello, thank you for this guide. Is this a good guide for a production server facing the internet? Are there any other steps that need to be taken in order to properly configure a production web server? Additional security, etc…

  10. juanita says:

    hi, how can add my domain on this server? i just install and the address is my ip address?

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.