Install WordPress on a Localhost

Wordpress Problems SolvedI’m creating a massive WordPress Theme and Plugin Tutorial, so I will first show you how to install WordPress on a Localhost for development purposes.

If you’re on a PC, you’ll probably want to get the Microsoft Web Platform Installer or Wamp Server. I prefer to install Apache, MySQL and PHP outside of a package system, but I leave that to you.

If you’re on a Mac or UNIX type system the following steps will work easily for you.

Video Tutorial

You can watch a Video Tutorial, or follow the steps that follow the video below?

Download WordPress Here and then open up MySQL, by typing something like mysql5 -u root -p. Then enter your password for MySQL.

Then enter the following to create the WordPress database and WordPress user.


GRANT ALL PRIVILEGES ON wordpress.* TO “your_username“@”localhost” IDENTIFIED BY “your_password“;



Edit the WP-Config-Sample.php File

Then locate the WordPress folder you downloaded and open wp-config-sample.php in a plain text editor.

  • PC – Notepad, Notepad++, etc. (Not Microsoft Word)
  • Mac- Text Wrangler
  • UNIX / Linux – Vim

Look for the following lines of text and enter your Database Name, User Name and Password.

define(‘DB_NAME’, ‘Database Name‘);

/** MySQL database username */

define(‘DB_USER’, ‘Your Username‘);

/** MySQL database password */

define(‘DB_PASSWORD’, ‘Your Password‘);

Then go to this url and get your secret keys WordPress Secret Keys. Copy everything you find there and past it over the space provided in the wp-config-sample.php file.

Now save that file as wp-config.php.

Installing WordPress

Copy the WordPress folder to the location of you Web Server. Then go to the following location in a browser for example if you installed it on your web server in a folder called wordpress.


  • Give Your Development Blog a Title
  • Enter a Username for the WordPress Administrator
  • Enter a Password for the Admin
  • Enter Your Email Address
  • Uncheck Allow My Site to Appear for Search Engines (If this is a Development WordPress Site that you Don’t want the public to see)
  • Click the Install Button and You’re Done

If you have any questions or comments leave them below.

Till Next Time

Think Tank


37 Responses to “Install WordPress on a Localhost”

  1. Justin says:

    I get this error, after running “http://localhost/wordpress/wp-admin/install.php.”

    Error: Error establishing a database connection.

    What do I do?

  2. Marzulli says:

    Hello i’m trying to install wordpress on my home computer running window 7-64 BIT.

    Also i do not have a webhosting.

    What should i do after i saved file as wp-config.php?

    Thank you.

  3. Marzulli says:

    I’m not using WAMP or Apache i’m still debating which one is best?

    My future website will be hoesting moslty pictures and videos.

    • admin says:

      It’s better to just install Apache so that you get used to how the web server will work. Another option which I think is the best is to install Ubuntu directly inside of Windows. Then Apache and everything you need for your web server is already set up. Here is the link to the easy install for Ubuntu

  4. Marzulli says:

    I was searching on Microsoft website and found Webmatrix what are your thoughts about this one compare to WAMP & Apache..?

  5. Marzulli says:

    I have a new issue after isntalling wordpresss…my web browser is not displaying the Chached links…?

    Thank again for your help.

  6. jerome says:

    Hi, My sample site still doesn’t appear. No error is displayed but instead the list of the php files in the wordpress folder are displayed. What do you think is wrong? Thanks.

  7. viswanth says:

    Hey Derek, I am nowhere near installing this stuff on my laptop. I know i have already bothered you yesterday. But I cant seem to get it. I have already installed Apache Tomcat 6 on my laptop. how do I install and configure php with that?

  8. laufeybir says:

    Hi, thanks for your amazing videos. I have not completed the installation on my pc, but I have one question for you regarding the WordPress database. Does the database have the sample data?

  9. Jared Lincenberg says:

    I went into terminal and tried typing mysql5 -u root -p and I got an error that said
    -bash: mysql5: command not found. Do you have a tutorial about it and do you have any suggestion about how to continue.
    Thank you for any help you can give me.

  10. Hi Derek

    Below is an error message trying to install wordpress.

    Your PHP installation appears to be missing the MySQL extension which is required by WordPress.

    Need advice

    D Calder

  11. I have Apache2.2 and mySQL 6.0 CE installed on my pc and my operating System is windows 8

    I am trying to install WordPress and I have an error messages

    Your PHP installation appears to be missing the MySQL extension which is required by WordPress.

  12. Hi Derek

    It seems like some people drying to set up word press is having the same issue I got I look up the problem on the Internet it seems there are a lot of people with this problem.

    I typed in the bar “Your PHP installation appears to be missing the MySql extension which is required by Word Press”

    I thought you could have a look at this issue which seems to be very big problem from the information I got from the Internet.


    Once Again

    D Calder

  13. Hi Derek

    I have Word-press 3.9.1 installed on Apache2.2 “local-host” Web Server

    would this make a difference to the extension which word-press Needs

  14. I have my wordpress installed on my localhost Web Server Apache2.2

  15. HI Derek

    This is my error message–> Your PHP installation appears to
    —-> be missing the MySQL extension which is required by WordPress.

    All the MySQL extension are the php.ini files.

    My Question is this
    the extension
    I use for my MySQL work bench is

    –>extension=php_Mysqli.dll which is in the php.ini file. Mysqli is the new configeration for Mysql workbench ce.

    For wordpress to be installed on my windows 8 it needs to have—> extension=php_Mysql.dll which is also in my php.ini file. The only thing I can see is that there is a new way or another extension wordpress needs.

    D Calder

  16. Hi Derek

    I have got wordpress 3.9.1

    This uses a different extension.

  17. Hi Derek

    The good news is I had reinstall my php and everything is know working except word-press won’t let me login and on the form I my user login name as–> admin

    I am going try and figure out this new problem


    D Calder

  18. Hi Derek

    OK I have install Word Press.


    D Calder

  19. Hi Derek

    Thanks Again for the Tutorials

    D Calder

  20. Hi


    I reinstalled My PHP and I reinstalled word press with a New
    Database with a New User Name. I kept My password I use to sign in to My SQL. ‘OK’

    Thanks again For Your Tutorials they are the best Tutorials I have every seen.

    D Calder

Leave a Reply

Your email address will not be published.