If you’ve been using WordPress to power your blog, you’d probably know that it is very useful to have a copy of WordPress installed in your local computer. It allows you to post a draft copy of your article offline, test & modify your theme or plugins locally before upload to the server.

Setting up WordPress on your local computer is straight forward. All you need is the WordPress itself & XAMPP as a host server. In this article, I show you how to install WordPress on your local computer with XAMPP.

1 Download & Install XAMPP Lite

First, you need to download & install XAMPP Lite. (I recommend the lite version because there are some applications that bundled with the full version which you are hardly need them for normal work. XAMPP Lite is most importantly contains Apache, MySQL & PHP, those three are the one we need.)

Be sure to download the self-extracting archive, it is the easiest way to install XAMPP. Double click the EXE file, choose a directory and click “Install”.

Setup XAMPP Lite

Once the installation is completed, double click the “XAMPP Control Panel” icon to launch XAMPP Control Panel. Next, click “Apache” & “MySql” start buttons to get both applications running.

XAMPP Lite Control Panel
XAMPP Lite Running

Now, you need to check whether your Apache local server is running properly. Go to your browser, in the address bar type http://localhost & press enter. If the XAMPP is installed correctly, you will see the default “splash” page as illustrated bellow. Select a language to enter the welcome page.

XAMPP Lite splash page
XAMPP Lite welcome page

2 Create The Database For WordPress

Your Apache server & MySql database are now running. Now we need to create a database for your WordPress. Under the Tools menu on the welcome page, click “phpMyAdmin”. Enter “MyWordpress” into the “Create New Database” textbox, make sure “utf8_unicode_ci” is selected & press “Create”.

Create The Database For WordPress

3 Download & Install WordPress

That’s all for XMAPP. Now, download the latest version of WordPress http://wordpress.org/ (zip file). Extract the WordPress to a new folder (name it as MyWordpress) under the “htdocs” folder where “XMAPP” is installed (default should be at C:\xampplite\htdocs\MyWordpress).

Under the folder, rename the file wp-config-sample.php to wp-config.php. Open & edit the file in Notepad, locate & change the following lines, make sure it is exactly the same as illustrated (database name is ‘MyWordpress’, database username is ‘root’, password is ” & hostname is ‘localhost’).

/** The name of the database for WordPress */
define('DB_NAME', 'MyWordpress');

/** MySQL database username */
define('DB_USER', 'root');

/** MySQL database password */
define('DB_PASSWORD', '');

/** MySQL hostname */
define('DB_HOST', 'localhost');

Again, go to your browser, in the address bar type http://localhost/wordpress/ & press enter. Key in a Blog Title, Your E-mail & press “Install WordPress”.

WordPress is ready to use

That’s it, your WordPress is now in your locally on your computer & ready to be used . Have fun !

Related Articles
External Links
Comments

18 Responses

  1. Try Wampserver instead of xampp if you are on windows. Much better.

  2. mowes portable is the best around here:
    http://www.chsoftware.net/en/mowes/mowesportable/mowes.htm

    -very good performance
    -very stable
    -portable

    ( its a portable server but you can launch it minimized at startup with option “-a” at the end of the shortcut path )

  3. I followed the instructions to install wordpress on my computer. Everything went fine. When I CLICKED ON APACHE & MYSQL, both started with “running”. However when they were finished, I got a page that had a blue square with numerous languages instead of gthe XAMPP heading for windows.

    I have windows7 operating system. Anyway I clicked on Welcome in english. That took me to a website for information of II7. I had to go into the control panel and click on MySQLlocalhost to get the database screen you show on your instructions. I was able to follow your instructions to the “t”.
    When I typed in the http://localhost/wordpress/ I got a “404″ message. I went over the process again and got the same thing. Any ideas of what may be causing this.

    • Have you try type http://localhost/ on your browser? and your browser should display a page with “XAMPP for Windows” heading. Otherwise, your installation is not successful. If you are using Win7, you will need to install XAMPP under C:\ directly, as the server may have the access problem to the C:\Program Files or other folders.

      • Thanks for that info. I double checked that to make sure it was installed in “C”. It was. What happens is I get “running” next to MySql but when I click on Apache I get “status check OK; busy; apache service started.” I have checked the fire wall and it has permission. I’m at a loss. I did have the ability to start both in the beginning but then “running disappeared by the word apache and I have never gotten it back.

        When I type in local host I get an IIS7 blue block with various languages spelling out welcome. When I click on the English version of welcome I get taken to a site: http://www.iis.net.

        Connie

        • When you type “localhost” & get IIS7, meaning to say your computer server is defaulted to Microsoft IIS7 server. It may conflicts with Apache.

    • He tells you to put the files in a directory called MyWordpress so instead of http://localhost/wordpress/ try http://localhost/MyWordpress/

      That did the trick for me.

  4. Well that’s the first thing that makes sense. I guess I will have to visit one of their blogs.
    Everything else seems to work just as it is supposed to. Thanks. Connie

  5. Thanks. You made this easy for me. I have wordpress local open and ready to roll

  6. thanks for your articles

  7. but here my apache module is not starting. what should I do?

  8. My computer server is defaulted to microsoft. that is why when I type http://localhost and hit enter my browser redirects my to a website iis or something that is of microsoft. and another problem is my apache module is not working. it shows it is busy upon starting. Can you please tell me how to fix this up?

  9. Hi Tamim & Yamani,

    If you install XAMPP Lite successfully, then your http://localhost should point correctly to apache local server. Try uninstall it, reset your computer to default for whatever setting you have made, and reinstall XAMPP Lite again.

  10. hi… when i put in browser the link http://localhost/wordpress/ open the page right but when i click on a link or other page in main page it error.. what can i do?

Leave a Reply

Feed subscribe via feed, or

get the email updates :

It comes with the intention to highlight anything about blogging & technology that appear to be interesting, beside the useful applications & tools. This is a place for bloggers & tech lovers, and for everyone who know how to use a computer.
I wish to announce that I'm no longer be the owner of the Quick Adsense Wordpress Plugin. The plugin previous homepage has been redirected to a new page ... (read more)
Popular Posts
Power Your PC With 45 Free Applications Adsense Format And Position Optimization Multiple URLs Opener Stumbleupon & Digg Thumbnail Maker Install WordPress In Your Local Computer With XAMPP 34 Excellence Online Photo Editing Websites Clear Your StumbleUpon New Shares From Friends Even Faster Draw Yourself Into A Cartoon Avatar

Recent Comments

  • CTR Rings : This is very useful tool to use. I always use this. (more)
  • Ramy_Yous : Thanks for the Websites :) , Really Good and Helpfull ; Thank you ! :) . (more)
  • International Web Development : It is very nice tool to open multiple urls in click, i am... (more)
  • CTR Rings : hey thanks, yes I will also definitely try this plug in as it seems to be very... (more)
  • Jon : Oh no! The plugin is broken, does not work with the latest version of Wordpress.... (more)