Transfer Live website to localhost (without plugin)

There are a lots of reasons why  web developer should develop their web site in localhost, the most common reason is to prevent their visitors from seeing the unnecessary or confidential data from incomplete  website.

There a several ways to transfer live website to localhost but for this posting I will explaining without using plugin. Since I am using wordpress as my platform of website, this method can be apply to others platform such as Drupal, Joomla and etc.

Before we begin, we need some tools that would facilitate our transferring procedure. The list of the tools :

  1. FileZilla
  2. WAMP/XAMP/MAMP ; depends on your OS.

Step 1: Live Site

Go to your Cpanel and click at phpMyAdmin.

Select the database that you need to transfer to localhost.

In the menubar (phpMyAdmin), click EXPORT tab and click Custom in the menu “Export Method”.

Make sure all the tables is selected.

In the Output Menu, “Compression” select: zipped

Finish by click button “Go”.

Step 2: Live Site & Localhost

Download the files of live site using FileZilla, see this for more info.

Copy download files of live site to the folder, this folder will used as a folder of database.


Step 3: Localhost

Create database by using WAMP/XAMP/MAMP by clicking phpMyAdmin.

Then click IMPORT tab to import the database of the live site to the localhost.

The files downloaded from the live site must be located in the c://wamp/www/

One of the files downloaded is wp-config.php, open it.

Modify the element such as:

define(‘DB_NAME’, ‘databaseName in WWW folder’);

/** MySQL database username */

define(‘DB_USER’, ‘root’); 

/** MySQL database password */

define(‘DB_PASSWORD’, ”);

follow as above and save it!!!

Step 4: Replace the link from live site to localhost

This link is will facilitate the user to change the live link to localhost link.

Download and paste it in the database folder in WWW folder and rename it as srdb.

Open your localhost site with /srdb. Follow this video at the minute 9:46 to understand more.

Now your live site is running in your localhost.

Credit to all the link I attached, thank you.