Install WordPress locally offline on your computer
July 19th, 2008 | Tagged as: install wordpress locally ¤ install wordpress on computer ¤ Installation ¤ Publishers ¤ WordPress | Download as PDFAlright! This tutorial is not the first one but I just installed a local copy of WordPress on my desktop so that I can design my own theme and use WordPress more as a CMS rather than being blog-centric script. I thought of posting this tutorial so that I can direct help on local installations to this article. If you have ever installed WordPress manually, then its exactly the same procedure but if you have only tried with One-click installations, then this is new for you. Without any further delay, here is what you need to do.
- Install XAMPP on your computer. (Download XAMPP)
- Now Start Apache & MySql from XAMPP and type localhost in your browser.

- Select phpMyAdmin from the left and create a new database.

- Download the lastest copy of WordPress available from WordPress.org
- Unzip the compressed file of WordPress under the htdocs folder of XAMPP folder (By default it is installed in C:\XAMPP\)
- Rename the wp-config-sample.php to wp-config.php and open it any editor for editing. (I use Notepad++ Portable)
- Come back to the wp-config.php file and fill your database name (the name you chose while creating the database), username (root) and leave the password entry as blank.
It should look like this (I chose wordpress as my database name):
define('DB_NAME', 'wordpress');
define('DB_USER', 'root');
define('DB_PASSWORD', '');
define('DB_HOST', 'localhost');
define('DB_CHARSET', 'utf8');
define('DB_COLLATE', '');
When you have filled in your Sql settings, then save the file and exit the editor. - Now open localhost/wordpress in your browser. Fill in the details and click Install WordPress.
- Copy your randomly generated password and login into your WordPress dashboard. Remember to change the password to something that you can remember easily.
- That’s it. Just open localhost/wordpress/ in your browser and it will point to the local copy of WordPress installation.
I am all open for help. Have your say in the comments.




Howdy! My name is Ashish K Saini aka Ashfame.

Thanks for the information.
very interesting. Thanks for sharing.. Let me try this!!!
hi, i’m new in wordpress,
thanks for your sharing, but i have problem, when i typed localhost/wordpress
the browser told me :
Object not found!
The requested URL was not found on this server. If you entered the URL manually please check your spelling and try again.
If you think this is a server error, please contact the webmaster.
Error 404
localhost
07/08/09 00:28:08
Apache/2.2.11 (Win32) DAV/2 mod_ssl/2.2.11 OpenSSL/0.9.8i PHP/5.2.9
. thank you,
(i’m sorry about my english
)
@panji
That will work if you have a folder named wordpress under your htdocs folder. Like if you have a folder named wp under your htdocs folder, then enter localhost/wp in your browser.
I’ve done everything as indicated and still this will not work.
I want to try this because I need to do some work and won’t have access to the internet, but my question is — how do I transfer the files and database to the appropriate domain once I want to go live with it.
Thanks so much for your help!
@Patrick
Please elaborate your problem.
@Erica
I guess just restoring the local database to the live Mysql server will do but if it didn’t then you can use the export and import feature of WordPress.
thanks for your reply! I actually was never able to get it set up it kept getting hung up when I hit start mysql – not sure what I was doing wrong
@Erica
Don’t know what is the cause of the problem. Running them services may cause issue, also try running them normally.
Other than this you can also try reinstalling XAMPP or install any other web server software.
Hope that helps.
Followed the directions and everything seems to work. Everything in the admin site works great. However, when I test out my website and click on a link, the link is broken and I get the following error:
Object not found!
The requested URL was not found on this server. The link on the referring page seems to be wrong or outdated. Please inform the author of that page about the error.
If you think this is a server error, please contact the webmaster.
Error 404
@Wes
Probably you have hardcoded links in your template. When you encounter the error page, check the address bar and you will realize that URL don’t exist on localhost. Hope that helps
Hi, Thanks for the tutorial. its just what i need.
Unfortunatly i have run into a number of errors. When i go to localhost/wordpress i get this message:
“Deprecated: Assigning the return value of new by reference is deprecated in C:\xampplite\htdocs\wordpress\wp-settings.php on line 520
Deprecated: Assigning the return value of new by reference is deprecated in C:\xampplite\htdocs\wordpress\wp-settings.php on line 535
Deprecated: Assigning the return value of new by reference is deprecated in C:\xampplite\htdocs\wordpress\wp-settings.php on line 542
Deprecated: Assigning the return value of new by reference is deprecated in C:\xampplite\htdocs\wordpress\wp-settings.php on line 578
Deprecated: Function set_magic_quotes_runtime() is deprecated in C:\xampplite\htdocs\wordpress\wp-settings.php on line 18
Warning: Cannot modify header information – headers already sent by (output started at C:\xampplite\htdocs\wordpress\wp-settings.php:520) in C:\xampplite\htdocs\wordpress\wp-includes\pluggable.php on line 850″
Can tell me why this would be happening?
Kind regards
Tom Connelly