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.
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.
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:
Don’t worry if you didn’t grasp any of the above steps, We will give a visit to all of these steps.
First things first, lets create a database. We will see how to create database for WordPress using phpMyAdmin, a very helpful utility in Wampserver.
This is where the real fun part begins. We will discuss all we need to install and run WordPress locally.
If you have also sorted out everything, click Let’s go!
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.
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.
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.
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.
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.
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.