1. Wamp Wordpress Forgot Password
  2. Wamp Wordpress Can't Connect To Database
  3. Install Wordpress Wamp

In simple words, installing WordPress on localhost means installing WordPress on a pc or mac. But…it will be only view able by you or your team.

Install WAMP and launch WAMP; FTP your online WordPress installation to your local WAMP www directory (ie. C.com) Using PhpMyAdmin, export your database, or the tables of your database. Using WAMP’s PhpMyAdmin, import your database or DB tables. Edit your wp-config.php and change the MySQL username, password, and hostname. When testing database connection within a plugin (such as Duplicator Pro), enter localhost:3308 (or whatever port your WAMP db is running from). I have not yet needed to change my hostname as you had to, but I will try localhost:3308 first, then 127.0.0.1:3308 if that does not work.

Wamp Wordpress

From this tutorial, you’ll learn how to install WordPress theme on local server using WAMP software. WAMP is a free software allowing you to run a local server on your computer for tuning up websites. If you don’t know where you can get it, please, feel free to visit WAMP official website and download its package from here. Many people install WordPress on XAMPP server. You should also know that you can also install XAMPP on a USB drive. But for MAC OS, WAMP is one of the best softwares to create the local server. Many Windows users also install WordPress on WAMP server.

Normally you would only install WordPress locally for testing and development purposes.

Make an offline website and once you are happy, you will be able to copy this offline website to your live website.

That’s the main purpose of installing Wamp and using it.

Installing WordPress locally on Windows is always preferable than working on a live website directly because working offline on localhost will be much quicker and you will save your bandwidth. Also see what is a localhost

WampServer will basically set up a web development environment on Windows machines so that you can easily develop dynamic applications. But obviously we are going to use it for WordPress.

It will install Apache web server, PHP and MySQL with a simple one-click install.

  • Download WampServer first. (It’s a free software)
  • Double click the downloaded file to start installation.
Don’t change any settings, try to install everything with default settings.
  • Once installed, Wampserver shortcut will be created on your desktop.
  • Double click the shortcut to run Wampserver. You may get a warning about running wampmanager.exe, simply click Yes.
  • A tiny Wampserver icon will appear in Windows taskbar which will turn green which means you are all set to go.
  • Click the top most option Localhost. It will show the localhost main page in your browser which means localhost is running perfectly. It will also give you information about which version of Apache, PHP are running on your system.

We are done with our Wampserver installation. Wampserver default location is c drive and folder name wamp64. Give a visit to this folder. Under this main folder, the folder most important to us is www folder. We will talk on this later.

Now is the time to start our WordPress love. As you may already know WordPress depends upon database and only after then we can start our WordPress localhost installation.

Basically installing WordPress either on a localhost or on a live website, it will always be a 3-step process:

  1. Creating a database for WordPress
  2. Copying WordPress install folder to www or public_html
  3. Initiate the installation.

Don’t worry if you didn’t grasp any of the above steps, We will give a visit to all of these steps.

Wamp Wordpress Forgot Password

First things first, lets create a database. We will see how to create database for WordPress using phpMyAdmin, a very helpful utility in Wampserver.

  • Click the tiny Wampserver taskbar icon and click the option phpMyAdmin, it will be second option from top.
  • Type root as the username with NO password. This is default username for phpMyAdmin. Also note, in Wamp phpMyAdmin password for root is nothing.
  • You are inside phpMyAdmin now. All the databases you will create appeared on the left hand side. From the top menu, click Databases.
  • Enter a database name and click Create. Also remember this name or make a note of it, we will need it later on. For the purpose of this tutorial, we have created a database with name wp_database.
We are done with our step one. Lets proceed to our WordPress localhost guide now.

This is where the real fun part begins. We will discuss all we need to install and run WordPress locally.

  • Our first step is to download WordPress. It will be downloaded as a zip file.
  • Extract the zip file. All the files extracted will be inside a wordpress folder.
If there is a wordpress folder inside another wordpress folder, installation will not work. All files should be in the main wordpress folder
  • Copy the folder inside www folder. The www is located in wamp64 folder where you installed Wampserver mostly c drive.
  • Rename wordpress folder to whatever name you want for your test site. It will also become your localhost website url address. For the purpose of this tutorial, we rename it to newsite.
  • From your browser, visit http://localhost/newsite (Remember! this is the folder name in www). WordPress installation begins.
  • Select your language and click Next.
  • On the next window, it’s already giving us an idea what do we need to install WordPress successfully. We need 5 things
  1. Database name: our’s is wp_database which we created in phpMyAdmin
  2. Database username: it will be default username which is root
  3. Database password: we are not using any password so we will leave this option blank
  4. Database host: it is localhost
  5. Table prefix: we will leave this option on its default value.

If you have also sorted out everything, click Let’s go!

  • Fill in all the information carefully and click Submit.
  • On the next screen, click Run the install
  • Fill in all the required information like Site Title, Username and Password for login. Click Install WordPress

Never use easy passwords like 12345 on live websites. We have used it because there is no security risk for offline websites.

See our article choosing strong passwords for more details.

  • Well back to our topic…you will be happy to see the Success! message. You can login to your blog right away.

The other way to login to WordPress later on is through url http://localhost/wordpress-site/wp-admin

You are working in localhost but it will give you a 100% online experience. You can make posts, install plugins, experiment with different themes and everything you can think of doing online.

You can definitely test and run multiple sites on localhost. Just keep in mind that every new install needs a new database to be created in phpMyAdmin and a new WordPress folder need to be copied in www folder. Rename the wordpress folder to newsite2, newsite3 or whatever you want.

In short, each project needs its very own database and its own folder in www.

Error establishing a database connection

Wamp Wordpress

This localhost database error is quite common. If you are getting this message or another message like Can’t connect to WordPress database then it means either you didn’t create a database in phpMyAdmin or you have miss-typed the name of database.

If you haven’t created a database, create one using steps we have discussed above.

localhost refused to connect or showing blank screen

It means localhost is not running on your machine. You can check it by checking the Windows taskbar for Wampserver green icon. If the Wampserver icon is not there, double click the Wampserver desktop shortcut to run it or from the Programs menu.

localhost 404 Not Found

If the localhost url not working, it means the website you are trying to reach doesn’t exist. The url name besides localhost should be the website folder name you have specified in www folder. Check you haven’t misspelled it. Also check Wampserver is running.

You have made a beautiful website on localhost, now ready to be pushed to your online web hosting. see our detailed article Moving WordPress blog from localhost to live server.

In this article, we have discussed WordPress localhost setup and covered almost all steps to install WordPress locally on WAMP.

If you still have any questions do let us know using the comments section below and we will love to answer.

Copying a hosted WordPress installation to a local machine for development is a fairly common task for many web designers. I prefer to accomplish this task with the excellent WordPress Duplicator Plugin by Life in the Grid. However, the Duplicator plugin is often an inadequate solution for larger sites on a shared hosting platform – you may experience frustrating sever timeouts and other difficulties.

Wamp Wordpress Can't Connect To Database

Sometimes old ways is best ways, so role up your sleeves and prepare to copy WordPress to WAMP server manually, just like developers did before the various WordPress migration plugins existed.

I found the following instructions on the WordPress forum, they were contributed back in 2012 by Sunny Johol and still work perfectly for WordPress 4.5.2 and WAMP with phpmyadmin 4.0.4. It you follow the steps exactly you should have no trouble copying a WordPress site to a local test server. If you follow the forum link above you may find these instructions can be modified to work with XAMP as well. Many, many thanks to Sunny for sharing his technique.

Notes:

Step 3 – Problem importing large database? Read this.

Steps 4, 5 and 6 – As in the examples below, be sure to leave the trailing slash off your urls.

Install Wordpress Wamp

  1. Copy your files from your webhost to your local server folder.
  2. On your webhost login to phpmyadmin and export your database (By Selecting your database and selecting the export tab and downloading to your computer)
  3. Log into your local phpmyadmin, create a new database and import the sql database into it by selecting the import tab and uploading your file.
  4. Once Uploaded we want to modify the database to reflect the new blog location being on the localhost. So we run the following SQL (Select the SQL tab and paste the following code):UPDATE wp_options SET option_value = replace(option_value, ‘http://www.hostedversion.com’, ‘http://localhost/testsite’) WHERE option_name = ‘home’ OR option_name = ‘siteurl’;
  5. We now want to fix the urls of posts and pages. So we run the following SQL:UPDATE wp_posts SET guid = replace(guid, ‘http://www.hostedversion.com’,’http://localhost/testsite’);
  6. If you have linked internally within blog posts or pages with absolute URLs, these links will point to wrong locations after you move the blog location. So we run the following SQL to fix this issue:UPDATE wp_posts SET post_content = replace(post_content, ‘http://www.hostedversion.com’, ‘http://localhost/testsite’);
  7. We want to now modify our wp-config.php file in our local server. Honestly, the easiest way to do this is to delete the wp-config.php file in your local server and then visit http://localhost/testsite in a browser.
  8. With the dialog message that comes up click the ‘Create a Configuration File’ button. Then click the ‘Lets Go’ button on the next screen.
  9. Fill in all of the fields:
    Database Name: This is the name of the database in your local phpmyadmin
    Username: This is your phpmyadmin username (usually root)
    Password: This is your phpmyadmin username’s password
    Database Host: This is usually localhost
    Database Prefix: normally is wp_ unless someone has changed it manually.
  10. Click Submit, the wp-config file will be created and everything should work on the local host.