Get Qi Theme with 150 superbly designed WordPress demos

Get Qi Theme
Qi Theme
Sign up for our newsletter and be the first to get all the latest Qode news and updates.
BACK TO TOP

How to Install WordPress on Localhost with WAMP

How to Install WordPress on Localhost with WAMP

Developing a WordPress site is no longer imaginable without creating a testing environment. Although this is not a mandatory step in the process of site-building, it is highly recommended to create a staging site where you’ll test any changes before going live. Frequently, both experienced developers and beginners install WordPress on their computers using software that simulates a server environment. In this article, we’ll show you how to install WordPress on Windows-powered computers using WAMP. To make it easier to navigate, we’ve broken this down into several smaller steps:

Why You Should Install WAMP

WAMP allows you to simulate a server environment on your computer. By installing WordPress on this local server, you get a testing site that doesn’t affect your live website and allows you to freely experiment. Local WordPress installation is also called the localhost.

In terms of computer networking, localhost is “this computer”, the one you’re working on. What does this mean? When you enter the URL into your browser, you’re essentially connecting with a “host” computer somewhere in the world, and this computer is delivering the page you requested. If you enter “localhost” into your browser, your browser will know you want to connect with your own computer. If the computer has a web server software such as Apache, your browser will deliver your computer’s page, also known as localhost. Every computer that’s connected to the Internet has its own IP address, including its localhost. Its address is usually 127.0.0.1.

Local WordPress installation can be used by developers and beginners to install themes and plugins, knowing that any changes and installations won’t affect their live site.

Keep in mind that your local WordPress installation will be visible exclusively to you. To make your site accessible to visitors, you need to acquire a domain and web hosting.

What is WAMP?

WAMP is a software package that combines Apache web server, MySQL and PHP, built for computers powered by Windows operating systems. Each of them is open source, while WAMP offers these tools wrapped in one package.

The name WAMP is an abbreviation of all the software it incorporates. W stands for Windows. A stands for Apache, a web server that allows your computer to host a website that is accessible via your browser. M is for MySQL, a system for managing databases. And P is for PHP, the scripting language used for creating dynamic web content.

Software like WAMP allows you to work in a local environment and it’s installed fairly easily.

Installing WAMP on Windows Computers

Download the WAMP software from the official WAMP website. To start the download, click on the button ‘Start Using WampServer’:

Official WAMP website

There are two versions of WAMP software – for 64-bit and 32-bit Windows operating systems. The current version we’re going to install is 3.2.0. Make sure you check your Windows specifications so you can choose the suitable software version.

Versions of WAMP software

You can do this by navigating to Control Panel > System and Security > System or to Settings > About if you have the latest version of Windows 10. Check the system type.

Check the system type

Once you select the version you need and click on the download button, you’ll see a pop-up window with additional settings and notifications. Simply click on the Download Directly button.

Download Directly button

When you finish downloading, click on wampserver execution file to start the installation. It is important to carefully go through every step of this process. First, you’ll need to choose the language.

LicenceAgreement

After that, you’ll have to accept the Licence Agreement.

Carefully go through every step

While you might be tempted to skip reading the Licence Agreement, we still suggest you go through it as it contains some several important notices regarding the installation of Wampserver.

Accept the Licence Agreement

Then, you’ll define a location for the web browser. By default, the browser is set to Internet Explorer, but if you want it to be Chrome or Mozilla, you can change the settings later.

Define a location for the web browser

Afterward, you’ll see a list of components for installation and a list of components you can add, such as PHP versions and databases. The latest WAMP software comes with MariaDB alongside the MySQL database. Select the components you need and click on Next.

Install WordPress Locally With WAMP

Then you can set up the location for the WAMP shortcut.

Set up the location for the WAMP shortcut

Confirm by clicking on the Install button.

Install WordPress Locally With WAMP

During the installation, you’ll be offered options to change the default web browser and text editor that displays the text files. In this case, the default editor is Notepad. If you don’t want to change anything, click on the No button in the setup pop up window. In case you want to change the settings, find the local .exe file of the browser and text editor you want (usually located in Program Files).

To change the browser used for WAMP using the setup pop up, click on Yes:

Change the browser in setup pop up

Find the path to the .exe file of the new browser. We will choose the Chrome browser, and its path is usually C:\Program Files + the folder with the name of the browser:

Choose the Chrome browser

Similarly, if you want to replace the default text editor, click on Yes in the setup pop up window that follows:

Replace the default text editor

Find the location of your text editor and select the .exe file in the folder:

Select the exe file in the folder

Finalize the installation. Once it’s done, you’ll see a WAMP shortcut icon on your desktop.

Click on the icon to open WAMP. If everything is working right, you will also find the WAMP green icon in the lower right corner of the screen, in the system tray.

Open WAMP

Afterward, you can test WAMP by entering the localhost address into your browser. If the browser displays this page, everything is working fine.

Entering the localhost address into your browser

You can also verify the functionality of PHP and MySQL. Navigate to the option Tools and open the link for phpinfo(), which will open a new window with information about PHP and phpMyAdmin for MySQL databases.

Navigate to the option Tools

For logging into phpMyAdmin, enter root as username, and leave the blank field for password. These are default login parameters. Click on the Go button to log in and access all the databases you’ll create.

Enter root as username

Click on the Go button to log in and access all the databases you’ll create.

Access all the databases you will create

WAMP Troubleshooting

Despite being relatively easy to install on your computer, WAMP sometimes winds up being non-responsive. The easiest way to identify this issue is to check the WAMP icon color. If the icon in the system tray isn’t green, some of the servers are not working properly. This usually happens when one of the TCP/IP ports required for WAMP’s full service is busy (MySQL server: 3306 or Apache server: 80).

WAMP Troubleshooting

To solve this issue, you need to change the port on the other program that’s using it; usually, that’s Skype.

Also, there’s a possibility to use the WAMP Tools options to change default ports for servers and databases. Simply right-click on the WAMP icon to open these options.

Use the WAMP Tools options to change default ports

Another issue you may encounter is not having Visual C++ Redistributable for Visual Studio 2012, which is required to use WAMP. Simply download it from the official Visual C++ page, install it, and then try to initialize WAMP again.

Qode WordPress Themes: Top Picks
Bridge WordPress Theme Banner
Bridge

Creative Multi-Purpose WordPress Theme

Stockholm WordPress Theme
Stockholm

A Genuinely Multi-Concept Theme

Startit WordPress Theme
Startit

Fresh Startup Business Theme

Biagiott banneri
Biagiotti

Beauty and Cosmetics Shop

Creating a Database for WordPress Installation

After successfully installing WAMP and verifying it’s working, it’s time to create a MySQL database. More precisely, we need a new, blank, database that will store your WordPress site data. Initialize WAMP – once it’s running, you’ll see its green icon in the system tray.

First, we’ll select MySQL as default database on our local server, since new versions of WAMP come with both MariaDB and MySQL databases. On WAMP, MariaDB is the default database, but we’ll be using MySQL. If you prefer, you can stick with MariaDB and simply follow the following steps in the tutorial.

To change the default database, right-click on the WAMP icon in the system tray and select option Tools. Click on Invert default DBMS.

Creating a database for WordPress installation

WAMP will reset and you’ll have a new default database. Now let’s move on to creating a database in MySQL. Click on the WAMP icon in the tray and select the phpMyAdmin option that allows you to manage MySQL databases.

Manage MySQL databases

There is another way to open these settings. Enter localhost in the browser while your WAMP is running.

Entering the localhost address into your browser

In the Tool section, click on the link to the phpMyAdmin page.

Click on the link to the phpMyAdmin page

Afterward, you’ll be directed to the phpMyAdmin login page in the web browser. Enter “root” as the username, and leave the password field blank. As we previously said, these are default parameters for access to the localhost phpMyAdmin page. After entering credentials, click on the Go button.

Entering credentials

When you log in, you need to click on the Databases option in the phpMyAdmin panel and create a new database for WordPress. Name the database – we will name ours wptest_db. Then click on Create.

Name the database

After this step, you’re ready to install WordPress.

Installing WordPress on Windows Using WAMP

Go to the wordpress.org page and click on the button ‘Get WordPress’.

Get WordPress

Then you’ll see the last available version of WordPress – click on the download button to save the WordPress zip file.

Download WordPress

Paste the downloaded zip file to the folder with WAMP installation. We installed our WAMP to the location C:\wamp64. This path depends on the location you selected for your WAMP installation. Once you paste the file to the folder, unzip the file by right-clicking on it and selecting the option ‘Extract here’.

Extract here

You can rename the extracted WordPress folder if you wish – some of our suggestions are mytestsite, mywpsite, etc. The path to this file will be the URL to your local WordPress site, so make sure the name of this folder is recognizable and easily remembered.

You can rename the extracted WordPress folder

We decided to rename the folder to wpsite. You can delete the zip file after the extraction.

Open the browser and enter the address of your local site, in our case it’s http://localhost/wpsite/. Make sure WAMP is running as you’re entering this address.

In the browser, you’ll see the menu allowing you to select the language of your WordPress site. We’ll select English and press Continue.

Select English and press Continue

In the next window, you’ll get the information about your database settings. Move forward by clicking on ‘Let’s go’ to continue with the installation.

Continue with the installation

Enter the information about your database, including username, password, host and table prefix.

A reminder: our database’s name is wptest_db. Its username will remain root, and the password field will remain blank. Leave localhost as the host, and you can do the same thing for table prefix. Since you’re working locally, these are default settings and there’s no need to change them. You can change the table prefix and other parameters on your live site to increase security.

Change the table prefix

When you click on the Submit button, WordPress will create a configuration file in the backend. In the next window, you’ll get the notification that connection with the database has been established, so you can continue installing WordPress on WAMP.

Connection has been established

Although the WordPress configuration file—wp-config.php—is automatically created, in case anything goes wrong you can also create it manually. We’ll quickly run you through the steps.

Open the wpsite folder (the root install-directory) containing your WordPress files. Then simply make a copy of the wp-config-sample.php file in the same folder and rename it to wp-config.php.

WordPress configuration

Open the wp-config.php file you’ve just created in a text editor. Follow the instructions from the automatic creation process when entering the information for the database name, username, password, host, and table prefix.

Entering the information

You can create the configuration file manually if, by any chance, automatic creation isn’t possible.

Next, you’ll see the welcome window. There you’ll enter the site title, username, and password for the administrator. Make sure your password is as strong as possible.

Make sure your password is as strong

Extra Tip

When you’re creating an administrator account for your live site, avoid the “admin” username. Hackers who are trying to attack your site usually start with attempts to log in as an admin. Although a different username cannot fully protect your site, it will make it harder for hackers to break in.

After the installation is finalized, you’ll get the notification. WordPress will create new tables in the database. Then you’re able to log in and access the admin panel on WordPress.

Extra Tip

Managing Permalinks in WAMP

Getting a “page not found error” is a common problem in testing environments such as WAMP. To make sure your permalinks are working right, you need to verify that the Rewrite module in Apache is enabled.

Open the WAMP options by clicking on the icon in the taskbar. Select the Apache options, go to Apache modules, find rewrite_module and enable it.

ManagingPermalinks in WAMP

If the module is already enabled, leave it that way.

After these changes, your links should work when you’re using the control panel in Settings > Permalinks to set up permalinks.

Final Thoughts

Using localhost and server simulators like WAMP is one of the most practical ways you can use to start your WordPress website. The expenses are minimal and hosting your site locally gives you easy access to all its files, including native WordPress files. Additionally, installing WordPress on WAMP lets you test your site as much as you like without worrying about visitors as everything is accessible only to you. Hopefully, this article will encourage you to start experimenting on your own and guide you when you start building your site.

Post your comment

Comments0