Installing WordPress on your local pc allows you to make changes to your theme and test new plugins before implementing these on your live website. A local installation is also ideal to test new versions of WordPress – making sure nothing breaks – before updating on the server.
This tutorial is split up in two parts:
- Installing WampServer on our local computer
- Installing WordPress on our local computer
in this post we´ll install the software environment that WordPress needs to run (server, Apache, MySQL and PHP). In the second part we´ll actually install WordPress on our local computer.
A bit of background for beginners
WordPress was built to be run on a server, not on a pc. To install the platform locally we first need to create a server environment on our computer. Luckily, this is very easy.
WordPress needs Apache (or another HTTP Server), MySQL and PHP to run. This is a pretty standard configuration for servers. On Linux servers this environment is often called a LAMP-stack (Linux Apache MySQL PHP). On Windows it´s called WAMP and on a Mac MAMP.
Several companies and organizations have created WAMP stacks. XAMPP, EasyPHP and WampServer are among the most used. For a full comparison, have a look on Wikpedia.
In this tutorial we´ll install WampServer on a laptop computer running Windows 7.
Head over to the download section on the WampServer website.
Choose the right version to download based on the following criteria:
- WampServer has versions for Windows 32 bits and Windows 64 bits. Read this article if you´re not sure which version of Windows you´re running. Choose the corresponding version of WampServer.
- Choose the PHP version you wish to install. You´re free to choose any version that WordPress supports (check here). Ideally you´d use the same version as you´re WordPress hosting provider is using.
Download the version you want to install.
In the pop up dialog box, WampServer will notify you of any additional software that you need to install, like Visual C++. Make sure to install these packages first before proceeding.
Doubleclick the icon and walk through the simple setup wizard. In most cases the default settings are fine. Also note that you can always change these settings later. I usually only change the default browser from Internet Explorer to Firefox or Chrome. Here´s a list of all steps:
- Accept the license agreement
- Select a location where you want to install WAMP
- Check the boxes if you want to add shortcuts
- Click the Install button
- Select your default browser. Common locations:
- Internet Explorer:
C:/Program Files/Internet Explorer/iexplore.exe
C:/Program Files/Mozilla Firefox/firefox.exe
- Google Chrome:
C:/Documents and Settings/username/Local Settings/Application Data/Google/Chrome/Application/chrome.exe
- Internet Explorer:
- Set the PHP mail parameters
The installation usually takes less then a minute.
If you see the following error message during the install: MSVCR100.dll was not found mak sure you´ve installed Microsoft Visual C++ 2010 Redistributable Package.
Running your WampServer for the first time
Go to Start > All Programs > WampServer and click Start WampServer
If everything went well, you´ll now see a small green icon in the lower right corner of your screen. This means all services are up and running.
If you see an orange or red icon, WampServer has not been able to start all services.
A common problem is that the port WampServer uses is already in use by another program. Skype, in most cases. If you have Skype installed on your computer, make sure it doesn´t use port 80:
- Open Skype
- Go to Tools > Options
- Select the Advanced tab and then the submenu Connection
- Untick the box that says Use port 80 and 443 as alternatives for incoming connections
- Restart Skype
Also make sure your FireWall is not blocking WampServer.
As soon as the light is green, open your browser and navigate to
http://localhost. (An alternative way to do this is by clicking your left mouse button on the WampServer icon and selecting the Localhost shortcut on top.) This should take you to the WampServer home screen.