In this chapter, you will learn how you can set up and install WordPress locally on a computer. By doing so, it will save you time from updating and previewing files (so, you don’t need to continuously add files on each modification). It’s also possible to use the local version to check new plugins, themes, and upgrades.
Working with WordPress locally is a perfect way to learn new things, understand different options, test premium plugins, test themes, updates, and other website changes before taking them live to your audience. In this guide, we will show you how to easily set up and install WordPress locally using XAMPP/WAMP.
This tutorial is meant for learners who want to learn how to setup and install WordPress locally and start working at home without the internet access.
How To Install WordPress Locally
If you have some technical background, you’ll be able to skip the detailed steps on this tutorial. Listed below are some of the simplified steps on how to set up WordPress on a local computer successfully:
- First, you need to setup & install a local server (For Mac Users: MAMP, For PC Users: XAMPP or WAMP).
- Next, you need to create a new database.
- Download WordPress from wordpress.org and extract the files to a new folder under the htdocs folder.
- After that, rename the wp-config-sample.php file to wp-config.php and update the database details according to your local server.
- Finally, run wp-admin/install.php and follow the instructions to install WordPress.
Let’s Get Started…
Before you start with it, have a check at the minimum requirements to run WordPress:
- PHP 4.3+
- MySQL 4+ Database Server
1- Setup a Local Server:
To install any PHP/database application on a local computer, you need a local host (ie. Apache + MySQL). For Mac users, use MAMP. For PC, use XAMPP or WAMP local server.
I’m using PC here, so I’m going to setup and install Xampp. Go to Xampp, download and install Xampp.
2- Create a New Database:
After you have successfully installed XAMPP on your computer, let’s start with it and it should take you to the start page. Now, you can simply click on phpMyAdmin. In the phpMyAdmin page, create a new database with the “TESTSITE” name.
3- Download WordPress from wordpress.org
Simply go to the link: wordpress.org and download the latest version of WordPress here. Go to the htdocs folder (where you installed the XAMPP), extract the wordpress.zip file to a new folder named as “testsite”.
4- Change “wp-config.php” File:
In the “testsite” folder where you extract your zip file, rename the wp-config-sample.php to wp-config.php. Open wp-config.php in the code editor and update the database details i.e. (db_name, user_name, password, db_host) according to your local server. And finally your database basicc information will be updated successfully.
5- Run install.php file:
First of all, open your internet browser, now, go to http://localhost/mysite/wp-admin/install.php and follow the instructions to install your WordPress.
The very first thing, you need to do is move to the WampServer web site by searching Wamp on Google, it’s going to land you to Wamp Server landing page, Now you can download the most recent Wamp Server. You will be faced with various options on their download page. Simply select the one which applies to your Windows (64-bit or 32-bit).
After getting downloaded WampServer on your computer, start with the installation program and carefully comply with on-screen instructions.
During the installation, WampServer will ask for the location of the default web browser. By default, it should use Web Explorer, but you can change that to Google Chrome or Safari by locating the browser in Program Files.
Once you’re practiced with the installation, launch WampServer
Set Up a Database for WordPress:
Now, you will need to create a blank MySQL database for your WordPress.
The next thing you need to do is, click on the Wampserver icon in Windows taskbar and then click on PHPMyAdmin bar. It will show you a popup with the username and password screen, the default username for PHPMyAdmin is “root” and you can leave the password field blank as well.
Once you have done with this step, now you can be logged into your PHP admin bar, here you can create databases for your WordPress.
Installing WordPress with WAMP:
WAMP stands for WampServer, is a compilation of Apache web server, with PHP and MySQL bundled for Windows computers. You need WAMP to setup your own local server environment and install WordPress on Windows by just clicking. There are some other important clients for Windows such as XAMPP and for MAC such as MAMP, but I also use and recommend WAMP. It is free to use and easy to understand.
The next step to install WordPress locally is to install WordPress into your WAMP server. Here, you need to download a fresh copy of WordPress from WordPress.org. Download WordPress and extract the zip file and copy the WordPress folder.
After all that, you need to search for the folder where you installed WAMP.
Copy the exact WordPress file to the C:\wamp64\www folder.
You can rename the WordPress folder to anything you want, such as mysite, testsite, etc. This folder name will be the URL of your local WordPress site, so be sure to choose something you will remember easily.
To test your site, open your browser and go to http://localhost/mysite/index.php
It displays the “Index page” message, therefore your WordPress is installed successfully.
Wamp Server/Xampp server actually used for testing as well as learning new things, you can easily understand WordPress with wamp server because when you have done something don’t worry about it, it’s not a live site. When you can try live WordPress site and have done some mistake it cannot recover as soon as possible.
We hope this article helped you learn how you can set up and install WordPress locally on a computer. A local server environment is so amazing for learning new things and testing purposes.
I’m wishing you the very best of luck for your new projects!
Get started on WordPress today and start turning your spare time into spare cash.
Don’t forget to share this article with your friends, schoolmates and also with the public.