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!

Do you like this post?

 Subscribe free via RSS, or by Email to get updates.