Categories

Featured templates

WordPress. How to copy WordPress website from live server to a local one

Elina Webb May 26, 2016
Rating: 4.4/5. From 5 votes.
Please wait...

This video tutorial shows you how to copy WordPress website from live server to a local one.

  1. First of all, you need to make a backup of the current live website. You can check the tutorial on how to make a WordPress website backup here.

  2. Copy the files of the live website to localhost.

    1. After saving the backup files on your computer, start the localhost software (in this case, we use WAMP). Open WAMP to start this program.

      WordPress-How_to_copy_WordPress_website_from_live_server_to_a_local_one-1
    2. Then open the wamp/www folder on the local drive. We will copy the website .zip files which were downloaded from the live server to www folder and unzip it.

      You can see all the files here.

      WordPress-How_to_copy_WordPress_website_from_live_server_to_a_local_one-2

      You can give a specific name for this local WordPress directory. We named it as wordpress under www folder.

      WordPress-How_to_copy_WordPress_website_from_live_server_to_a_local_one-3

      Rename the wp-config.php file. You can also remove this file completely.

      WordPress-How_to_copy_WordPress_website_from_live_server_to_a_local_one-4
  3. Create the database within your localhost.

    1. Open a browser. Type localhost/phpmyadmin in the address bar.

      WordPress-How_to_copy_WordPress_website_from_live_server_to_a_local_one-5
    2. Click on Databases tab.

      WordPress-How_to_copy_WordPress_website_from_live_server_to_a_local_one-6

      Create a new database.

      WordPress-How_to_copy_WordPress_website_from_live_server_to_a_local_one-7

      Click on this new database to open it.

    3. We will need to import the .sql file which we have got from the backup file to this new database.

      But first, we should edit this .sql file to change the url to the localhost url.

      Open the .sql file with a code editor. Use the replace function of the code editor software to replace it with the local url.

      The local url will look as http://localhost/wordpress-folder

      It’s: http://localhost/wordpress in our case.

      Replace all the url instances and save the file.

      WordPress-How_to_copy_WordPress_website_from_live_server_to_a_local_one-8
    4. Go back to phpmyadmin in localhost. Click on the Import.

      WordPress-How_to_copy_WordPress_website_from_live_server_to_a_local_one-9

      Browse the edited .sql file. Hit the Go button to import it.

      WordPress-How_to_copy_WordPress_website_from_live_server_to_a_local_one-10

      We get the successful import message here.

      WordPress-How_to_copy_WordPress_website_from_live_server_to_a_local_one-11
  4. On the last step, we will connect the website’s files with the database.

    1. Open a new tab on the browser, and type the local site url in the address bar.

      WordPress-How_to_copy_WordPress_website_from_live_server_to_a_local_one-12
    2. The installation page is opened. We will follow the steps on the screen to run the installation.

      WordPress-How_to_copy_WordPress_website_from_live_server_to_a_local_one-13

      Creating wp-config.php file, which was renamed/removed previously.

      WordPress-How_to_copy_WordPress_website_from_live_server_to_a_local_one-14

      Adding the localhost database details. The table prefix should be the one, used for the live url and it is wp_

      WordPress-How_to_copy_WordPress_website_from_live_server_to_a_local_one-15

      Just keep following the steps that appear on the installation screen. Log in with the same details that were used for the live website.

      WordPress-How_to_copy_WordPress_website_from_live_server_to_a_local_one-16

      The site is copied to the localhost now!

      WordPress-How_to_copy_WordPress_website_from_live_server_to_a_local_one-17

Feel free to check the detailed video tutorial below.

WordPress. How to copy WordPress website from live server to a local one
This entry was posted in WordPress Tutorials and tagged localhost, move website, WordPress. Bookmark the permalink.

Submit a ticket

If you are still unable to find a sufficient tutorial regarding your issue please use the following link to submit a request to our technical support team. We'll provide you with our help and assistance within next 24 hours: Submit a ticket