How to Manually Move a Live WordPress Website to Local Server

How to Manually Move a Live WordPress Website to Local Server

wordpressIn this post, we will learn about How to Manually Move a Live WordPress Website to Local Server in Windows step by step with a screenshot.

There are applications like MAMP, WAMP, XAMPP used to create a local server environment. This helps to install packages and many CMS (Content Management System) like WordPress so that developers and site owners can build their site in local PC or Mac.

First, you need to learn XamppTutorial: How to install and setup xampp server on laptop/pc in windows.

If you know already then Install WordPress on local server in Windows, If you have done from installing then you may want to sync the live site’s content to the local site so that you can test plugins/themes/ WordPress version updates on a local site before updating on a live site. Using a local server environment will save you a bunch of time. This is a very important step to prevent any errors between two plugins and WordPress new updates, which is a common issue all the time and without worrying about breaking your site.

Move Live WordPress Site to Localhost:

Step – 1: Download Live WordPress Site Files

For download live WordPress site files, I am recommending a two types process.

a.) You can use FTP clients like Filezilla or

b.) You can directly download from your hosting file manager.

a.) Download files via FTP clients like Filezilla:  This step is probably the longest because you will have to wait for all your site files to download via FTP. This will depend on your internet connection speed and how many files stored on your server.

First, launch Filezilla and connect your hosting server, after server connected select all files and download all your WordPress files and folder to your computer, it will take some time to download.

b.) Download files via Hosting File Manager (CPanel/Plesk): Open your CPanel or Plesk panel and open file manager, select all files and click on Add to Archive button. It will create a zip file to your directory. After this process, download that zip file it will contain all WordPress files and folders.

(This is Plesk panel screenshot↓)

Step – 2: Download SQL Database From Your Live Sites phpMyAdmin

For download live WordPress site database, Go to your hosting and find phpMyAdmin, click on that and login to your phpMyAdmin section. Select the correct database and click on the Export option.

After clicking on Export button, you will see this type of page↓. Click on Go button, and SQL file will start downloading on the bottom of the page.

Step – 3: Creating a Database on Localhost phpMyAdmin

First login to phpMyAdmin section of your localhost with the URL “http://localhost/phpmyadmin/” and create a new database with the same name as live site’s database and then click on create button.

Now move your Downloaded Files (Including SQL file and Zip file which we downloaded before) into XAMPP htdocs folder and extract Zip folder into your specified folder. For WAMPP user move your downloaded files into www folder and extract Zip folder into your specified folder. My folder name is coderhold and file name is coderholdbackup-2-18.zip

Step – 4: Importing Your Live Database to Local phpMyAdmin

Now select the newly created database and then click on the Import option. Choose the live site’s database (SQL File) which we downloaded in step -2 by clicking on Choose File button and click on Go button. That’s it.

Note: If your database is too big then use bigdump script to import large data on the server.

Step – 5: Replace Live Site URL with Local Site URL in Tables 

You need to run SQL queries in a database for this. First, select the newly created database and click on the SQL tab and paste the query in the box and click on Go button.

Make sure that you change the code to fit your site, such as replace http://www.example.com to your live site URL and replace http://localhost/test-site to your local site folder. Change table prefix wp_ to your live site table prefix if you want.

1. Ensure to use HTTPS, if your live site URL is SSL protected.

2. Localhost URL should always be with HTTP.

3. WordPress tables generally starts with “wp_” prefix. But if you have changed with other prefixes, then replace the table names in the query as per your prefix.

This step is very important because you have uploaded live site’s database to the local server but the tables will still have live site’s URL references instead of localhost which you need to change it.

Step – 6: Change wp-config.php file for Configuring Database

Open your localhost site folder and open wp-config.php file in the code editor like notepad/notepad ++. Now replace the database name with the correct name as you created in step 3.  Replace the username with your local MySQL username, generally, it is root (unless you changed it). If you have set the password for MySQL user root on your localhost, then enter that password. Otherwise, leave it empty and save your changes.

 

Step – 7: Accessing Your Offline Site

In your browser, Type http://localhost/your-site-folder-name. Mine is http://localhost/coderhold , and press enter button on your laptop/pc keyboard. If you see your local site is same as your live site then congrats you have created your live site copy in your localhost server.

Now check that every link and menu button of your site is working fine.

Check your live site admin working fine by typing http://localhost/your-site-folder-name/wp-admin. Use the same credentials you do for your online site and log in. If working fine then congratulation your localhost site is perfectly working.

If not then open your .htaccess file and type your local site folder name near . /index.php. (sometimes when you click on menu then it will be redirected to your server dashboard such as http://localhost/dashboard/)

Mine is . /coderhold/index.php [L]

Congratulations! That’s all your live site is now copied to your local server, and you are ready to test drive it. You Manually Move a Live WordPress Website to Local Server

If you face any difficulty implementing it in your pc or laptop, then you can contact to our developer’s team. Now you have the basic idea on How to Manually Move a Live WordPress Website to Local Server. Good luck with your project!

 

 

0 replies

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.