How to Install WordPress on Local Server with XAMPP
When we frequently make changes for WordPress setting or tweak the theme, the best solution is that install a WordPress on your local server to preview and test first. Here is a quick tutorial on how to install WordPress locally on your computer.
1. In order to run any PHP/database application on a local computer, you need a local host with Apache, PHP & MySQL. For PC users, download XAMPP. XAMPP is an easy to install and use Apache distribution containing MySQL, PHP and Perl.
2. Run xampp-control.exe follow the instruction to install XAMPP. And then start the Apache and MySQL services in your xampp control panel application.

3. Open your web browser and go to this address: http://localhost/. Click on the phpMyAdmin at the left column under Tools section.

4. Create a new database (eg. wordpress) in the “Create New Database” field, and select utf8_unicode_ci in the drop down box in the next field. Click on Create. The XAMPP setup is now complete. Now you can install WordPress on your computer server, check out our step-by-step guides on how to install WordPress.
5. Go to your computer C:, open xampp folder, select htdocs folder. Copy & paste the whole latest build of WordPress files here. Rename the wp-config-sample.php to wp-config.php. Open wp-config.php and update the database details (db_name, user, password, host) according to your local server. The default admin username is root.
// ** MySQL settings - You can get this info from your web host ** //
/** The name of the database for WordPress */
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', '');
6. With your browser, go to http://localhost/wordpress/wp-admin/install.php to run install.php and then follow the regular instructions to install WordPress. That’s it!


















« 3 Comments »
Thanks for the article about XAMPP. I wonder if I create a website with WordPress, and a Membership Plugin, and BuddyPress on my PC will there be many problems moving my local PC site to a professional Linux based hosted site?
Thanks,
Randy
Hi Randy,
Once you want to move to a “real” web hosting, just copy all files to the server via FTP (such as FileZilla), export database from PHPMyAdmin and then import it to the new hosting,
EDIT the wp-config.php file with your new hosting details like database name, username, password, & database host.
it’s very simple i think you can handle it! ;)
best,
Wallace
Wallace: You will also have to backup your database before moving the site to a server. Once it is backed up you will have to open it with notepad and replace all instances of (http://localhost/websitename) with the url of your web site.
Also, make sure to disable all of your plugins before uploading all your files.
Once uploaded import your backup database and enable your plugins.