Beginner’s Guide: Install WordPress on Local Apache Web Server

October 3, 2007 – 12:15 am

Imagine installing a new, untested WordPress plugin directly inside your hosted, live web server, just to find out that it screw the whole blog? Imagine another situation – switching to a new WordPress theme just to find out that it doesn’t work nicely with your favorite WordPress plugins? There is a way to solve all of this problem – by doing all of the above in a test environment, accomplished by having a nice WordPress setup mimicking your live server, inside your own local PC .


install wordpress on local apache webserver beginners guide

Steps to Install WordPress on a Local Apache Web server


1- Make sure you have installed Apache web server with PHP and MySQL support. If you have not yet done so, you can follow my Windows guides regarding Apache and PHP Installation. Rest assured that my guides passed the basic requirements needed to run WordPress (PHP 4.2 or greater + MySQL 4.0 or greater).



2- Download the latest WordPress zip package from here.



3- Start your Apache and MySQL service. Make sure you can access your locally setup homepage.



4- You need to create a MySQL database for WordPress. In this guide, I use PhpMyAdmin (find out how to install PhpMyAdmin). Login to your PhpMyAdmin (or any software that you use) and create a MySQL database with a name of your choice (I choose “wp”).




5- Make sure your “wp” database was successfully created. Example:




7- Extract the downloaded WordPress zip package to your Apache root directory. If you follow my guide, the path is C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\ . This will create a “wordpress” folder inside the “htdocs” directory.



8- (optional) You can rename the “wordpress” folder to anything. Some people changed it to “wp” or “blog” so their blog address will be “http://<hostname>/blog” or “http://<hostname>/wp” instead of http://<hostname>/wordpress .



9- Open your WordPress folder (wordpress / wp / blog ), copy wp-config-sample.php to a new file called wp-config.php. I changed mine to “blog”.



10- Edit wp-config.php with any text editor e.g. Notepad. Change the things that I have marked out in bold. Don’t forget to save the file afterwards.

define(‘DB_NAME’, ‘your-wordpress-database-name‘); // The name of the database
define(‘DB_USER’, ‘root‘); // Your MySQL admin username used to manage the database above
define(‘DB_PASSWORD’, ‘root-user-password‘); // …and password
define(‘DB_HOST’, ‘localhost’); // 99% chance you won’t need to change this value
define(‘DB_CHARSET’, ‘utf8′);
define(‘DB_COLLATE’, ”);


11- Fire-up your web browser. Type in your web server name plus your WordPress setup path (http://<your-webserver-name/blog/wp-admin/install.php), for example:


Remember! “blog” can be “wordpress” or “wp” depending on what you put on step 8. Default is “wordpress”.



12- If the previous step was successful, you will be shown a WordPress initial start page. Click “First Step.




13- Insert your Weblog title and your email account. Don’t worry, both are changeable after setup. Click the big, bold “Continue to Second Step” button.




14- You will be given an initial password to access your blog account. Copy it somewhere safe. You will need it later. Click the “wp-login” link to access your WordPress login page.




15- Enter “admin” as Username and the “password given to you before” as Password. Obviously, click the “Login” button afterwards.




16- You had successfully installed WordPress if you get a page similar to the picture shown below.




17- You can view your initial blog with the not-so-wonderful default theme by clicking on the “View Site” link.




18- Don’t forget to change your password! To do so, click “Users” –> “Authors and Users”. Then select “admin” by ticking the box under “ID” and click the “Edit” button.




19- Enter the new password of your choice TWICE and click “Update User“. Test your password by logging out of WordPress and log in again with the new password.




You have successfully installed and run WordPress on Apache web server locally! Now you can mimic your live WordPress site by installing a similar WordPress theme, plugins and more. The next time a wonderful themes or plugins seems relevant to your blog, safely test it on your local WordPress server before applying it live on the Internet. Better be safe than sorry!


Bonus Video: Learn how to install WordPress live


Tags: , , , , ,


Related Posts:

  • None Found

  1. 34 Responses to “Beginner’s Guide: Install WordPress on Local Apache Web Server”

  2. Very nice tutorial. I’m positive that a lot of people will love this.

    By Brown Baron on Oct 4, 2007

  3. thanks brown baron! i really hope so.

    By TechMalaya on Oct 4, 2007

  4. I should say this is a great tutorial, useful for many people who find it difficult to install WP locally. Stumbled.

    By Nirmal on Oct 6, 2007

  5. thanks for the stumble man!

    By TechMalaya on Oct 6, 2007

  6. Great tutorial, wa caya lu! This is the exact tutorial which I was searching. Very well explained. Thank you. Terima kasih.

    By Daram on Oct 18, 2007

  7. glad you are benefiting from this Daram.

    By TechMalaya on Oct 19, 2007

  8. Syahid,
    This is just what I need, my Apache web server, PHP and MySQL skills are very limited but I will give it a go.

    By jsanderz on Jun 23, 2008

  9. Stumbled.

    By jsanderz on Jun 23, 2008

  10. @jsanderz: Thanks for the stumble man!

    By Syahid A. on Jun 24, 2008

  11. Hey finally some tutorial that didn,t make me feel stupid..clear and to the point.

    By Lionn on Jul 20, 2008

  12. salam.. thx bro for tuto yg amt bgus nih..
    mmg phm tuk noobs mcm sy nih…
    i want to ask something… y others cant open ma blog?

    By fullmetal90 on Aug 8, 2008

  13. @fullmetal90: If you are hosting your blog on local, you should move it to a web hosting company for the public to see.

    By Syahid A. on Aug 9, 2008

  14. superb tutorial indeed! previously i used many other ways but failed.

    learn a lot from here from apache, php & mysql installation.

    all done & success!

    thanks a lot ;)

    By megat on Sep 28, 2008

  15. Please allow me to share this video tutorial on Installing WordPress locally with your audience.

    By Shane on Oct 24, 2008

  16. @Shane: Nice. Guys, check out his tutorial by clicking on his name above.

    By Syahid A. on Oct 24, 2008

  17. tq.finally i finish my website..hehe

    By farhan on Jan 13, 2009

  18. Very good Guide, am trying this for 2 days now, I hope it will finally work after i finish this guide :)

    By Web Browser on Jul 11, 2009

  19. Please help! – thanks for the guide i followed the install instruction but after installing and logging in i am diverted to an index pg of the phps instead of the admin php itself. Do i need to tweak anything pre/post install?


    By RK on Oct 20, 2009

  20. hhehe..join ko boleh?

    By muhdfarhan on Dec 27, 2009

  21. 2 words! YOUR AWESOME!!!

    Tx for this F***** great tutorial
    its just so well explained easy to follow i mean!
    very nice!

    I think some people nowadays won’t understand this
    because there are some minor changes but if you use common sense you’ll get it!

    TX you wont believe how happy i am!!!!

    By 2DecadesAgo on Jun 26, 2010

  22. Thanks for installing wordpress on local guide.

    By Alfa on Aug 31, 2010

  23. Thanks lol….
    Below mentioned url is very easy to understand,

    By pravin on Nov 17, 2011

  24. Very helpful – thanks.

    By dmathew on Jan 23, 2012

  25. Thanks a lot for the installation guide. It was really very helpful.

    By Sonny on Jul 26, 2012

  26. Hello,
    Thanks for sharing this guide.
    Now I have successfully installed and run WordPress on Apache web server locally, but I can’t apply it on internet, even if I have a fix ip address.
    Would you please help?

    By serena on Dec 18, 2012

  27. you need a domain name.
    your domain name should point to your fixed ip address on the dns.
    your apache server should not be set locally. set it up to prepare for live, and use the fixed IP + the domain name.

    By syahid_a on Dec 18, 2012

  28. Many thanks for replying.
    Would you please tell me how to set apache for live? (I used AppServ to install apache automatically, and there seemed don’t have any option to set apache locally or live.)

    And what does “use the fixed IP + the domain name” mean?

    ps. yes, my domain name is pointed to my fixed ip adress.

    By serena on Dec 19, 2012

  29. I just found the apache version which I installed doesn’t have “Network domain” for users to type in.
    May I ask, is it the cause that I can’t make my apache server live to internet?

    By serena on Dec 19, 2012

  30. The problem is solved.
    Thank you.

    By serena on Dec 19, 2012

  31. so what is the problem then. may i know?

    By syahid_a on Dec 20, 2012

  1. 4 Trackback(s)

  2. Oct 6, 2007: Weekly Roundup issue 1 - Bull3t’s Blog
  3. Oct 10, 2008: First Steps Towards the WP Theme « Web and New Media
  4. Jun 14, 2011: How to setup PHP Stack with MySQL/Wordpress on Windows in 1 minute » Save time and money
  5. Nov 4, 2011: Building a LAMP (Linux,Apache,Mysql,PHP) Wordpress blog from scratch! | Cale Pantke

Post a Comment