Want to install XAMPP and WordPress to create a local WordPress development site? This is the first chapter of the Complete WordPress Theme Guide series. In this chapter, you will learn how to install WordPress on a local computer with just a few clicks. By doing so, it will save you time from updating and previewing files (so, you don’t have to frequently upload files on every change). You can also use the local version to test new plugins, themes, and upgrades and you can check the full feature of the theme. Once it will done on local then you can export the database and files on your live server This tutorial is intended for beginners who want to learn how to run WordPress locally.
If you have some technical background, you can skip the detailed steps in this tutorial. Here are the simplified steps on how to install WordPress on a local computer:
- Install a local server (Mac: MAMP, PC: XAMPP or WAMP).
- Create a new database.
- Download WordPress from wordpress.org and extract the files to a new folder under the htdocs folder.
- Rename the wp-config-sample.php file to wp-config.php and update the database details according to your local server.
- Run wp-admin/install.php and follow the instructions to install WordPress.
Before you start, let’s look at the requirements to run WordPress:
- PHP 4.3+
- MySQL 4+ Database Server
1. Install a Local Server
I’m using Mac here, so I’m going to install MAMP. Go to mamp.info, download and install MAMP.
2. Create a New Database
After you’ve installed MAMP, run it and it should take you to the start page. Now click on phpMyAdmin. In the phpMyAdmin page, create a new database (eg. wordpress).
3. Download WordPress
Go to wordpress.org and download the latest build of WordPress. Go to the htdocs folder (where you installed the MAMP), extract the wordpress.zip to a new folder (eg. mysite).
4. Update wp-config.php File
In the folder, 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.
5. Run install.php
With your browser, go to http://localhost:8888/mysite/wp-admin/install.php and follow the instructions to install WordPress.