top of page
How to Move a Live WordPress Site to Localhost Xampp.jpg

How to Move a Live WordPress Site to Localhost Xampp

Moving a live WordPress site to a localhost using XAMPP involves several processes, like creating a backup of your live site, among others. It's important to ensure that all necessary files and configurations are transferred properly to avoid any issues on the local version of the site. In this blog post, we'll walk you through moving your live WordPress site to your localhost using XAMPP, including tips and tricks to make the transition as smooth as possible.

Using the WordPress Export/Import Tool

Using the WordPress Export/Import Tool is one of the simplest ways to transfer your website's content. This method is especially useful if you are planning a full website redesign and only want to transfer the content of your website. All website content, including media files, posts, pages, comments, menus, and custom post types, will be copied, but your WordPress installation, themes, and plugins will not be transferred.

There are three major steps to complete this process:

Export the content of your website.

Install WordPress on your local machine.

Import the exported data into your local WordPress installation.


Export Website Content With the Export Tool

Navigate to your WordPress website and go to the Dashboard to get your website content. Select Tools, and then Export. Keep the All Content radio box selected and click the Download Export File button to export your website content. That's all there is to it! You have successfully exported the content of your website.

Create a New WordPress Installation on Your Local Machine

Before importing your website content, you must create a new, clean local installation to import the data. Install a fresh copy of WordPress to avoid contaminating your newly transferred content and clean the development environment with leftover data from previous development projects.

Import Website Content With the Import Tool
Backup Your Live WordPress Site

Use a plugin like UpdraftPlus or All-in-One WP Migration to create a backup of your live site. This will ensure that you have a copy of all your site's files, including the database, in case anything goes wrong during the migration process.

Download and Install Xampp

Go to the XAMPP website and download the compatible version with your operating system. Once downloaded, run the installer and follow the prompts to complete the installation.

Create a New Mysql Database

Once XAMPP is installed, open the control panel and start the Apache and MySQL services. Open a web browser and go to http://localhost/phpmyadmin/ to access the MySQL database. Create a new database for your local site.

Import Your Live Site’s Database

In the phpMyAdmin interface, select the new database you created and click on the Import tab. Browse for the .sql file from your live site's back up and click Go to import the data into the new database.

Copy Your Live Site’s Files to the Localhost

Navigate to the htdocs folder in your XAMPP installation directory and create a new folder for your local site. Copy all your live site's backup files into this new folder.

Update the Wp-config.PHP File

Open the wp-config.php file in the new local site's folder and update the database name, username, and password to match the new local database.

Update the Site URL

In the WordPress dashboard, go to Settings > General. Update the site URL to point to your localhost, for example, http://localhost/your-local-site-folder.


Test Your Local Site

Go to http://localhost/your-local-site-folder in your web browser to access your local site. Test all the functionality and links to ensure everything is working as expected.

Update Permalinks

Go to Settings > Permalinks and update the permalinks structure to match your live site's structure. Your live WordPress site has been successfully moved to the localhost XAMPP. You can now make changes or updates to your local site without affecting the live site.

Advantages of Developing on Localhost


For developers, developing on localhost is a cost-effective solution. Developers can avoid the costs associated with hosting a website on a remote server by using a localhost. This includes server rental, web hosting, and domain registration costs. Additionally, developers can save money using free or open-source software on their local machines. This cost savings is especially advantageous for small businesses or independent developers who may not have a large budget.

Faster Development

Working on localhost can also result in shorter development times. By working on a local machine, developers can avoid the latency of working with a remote server. This can expedite the development process by allowing developers to test and modify their code more quickly. Working on a localhost also will enable developers to work offline, which is especially useful when traveling or working in areas with limited internet connectivity. Overall, developing on localhost can streamline and improve the development process. Increased control:

You Don’t Need to Be Connected to the Internet

This means you can work on your projects even when you don't have internet access, which is especially useful if you work in an area where internet connectivity is poor or unreliable. It can also be more secure because it reduces the possibility of hackers gaining access to your code or data.


It Saves Server Resources

Because you are not using resources from a remote server but rather running everything on your computer, you are saving server resources. This can be very useful for large or complex projects, as it can help you keep costs down and avoid any server downtime or maintenance issues. It can also be more efficient because you have more control over your resources.


Simple Testing

Developing on a localhost enables quick and easy testing of new features or changes to a website or application. This is due to the developer's ability to make changes and see the results immediately without uploading the changes to a live server. This saves time and resources while allowing for faster development iterations.



Developing on a localhost adds an extra layer of protection to the website or application. This is because the website or application is not accessible to the general public, and any vulnerabilities or issues can be identified and fixed prior to going live. This helps avoid potential data breaches or other security issues if the website or application is hosted on a live server. Furthermore, working on localhost eliminates the risk of hackers infiltrating the system while development is underway.



Moving a live WordPress site to localhost XAMPP can be tricky, but it is doable. Following the steps outlined in this blog post, you can easily transfer your live site to your local computer and test it before making any changes to it. This will allow you to make any necessary adjustments before publishing them to your live site.

bottom of page