Looking for something?

How to create a local copy of your WordPress website

Making changes to a live WordPress website is risky.

Something as small as a missing semi-colon, a new line of code or a dodgy plugin could break your entire website!

This is why I recommend that you create a local copy of your website to test changes on before carrying them out on a live website. A local copy of your website will run offline on your computer, and it provides an easy and safe way to play around with your website and its files.

Once you have a local copy of your WordPress website set up you can edit the code and install plugins to your heart’s content without the risk of breaking your live website.

This is particularly great if you are preparing for the arrival of Gutenberg and you want to test out the compatibility of your theme and plugins with the Gutenberg editor.

In this post, I’m going to show you how to create a local copy of your live WordPress website.

1 | Download and install Local by Flywheel

First things first, you will need to set up a local development environment where you can set up local WordPress websites.

I personally use a free tool called Local by Flywheel and this is what I am going to be using throughout this tutorial.

Start by heading over to the Local by Flywheel website. The homepage looks like this:

Local by Flywheel homepage | HollyPryce.com

On the homepage, click Free Download.

This will open a pop-up where you should select the platform you are using (Windows or Mac) and enter your details.

When you are ready, click Get it now! to start the download.

Local by Flywheel download | HollyPryce.com

Once Local by Flywheel has finished downloading, click on the file to begin the installation. You may be prompted to allow changes to your computer throughout this process.

Eventually, you will see a screen that looks like this:

Local by Flywheel installation | HollyPryce.com

All you need to do here is click Let’s Go! and wait for the installation to run.

While you are waiting for it to install, move on to the next step…

2 | Install the Duplicator plugin

While there are various ways in which you can export your content from your live WordPress website, I’ve found the easiest way is using the Duplicator plugin.

If you aren’t familiar with Duplicator then basically it is used to create “packages” that contain a copy of your WordPress files and the database that your website runs on. Duplicator can be used to move your website from one host to another, but it also provides an easy way to make a copy of your content so that you can create a local version of your website.

To install the Duplicator plugin hover over Plugins in the left-hand menu and click Add New.

Add new plugin in WordPress | HollyPryce.com

Then use the search form on the plugins page to search for Duplicator. It looks like this:

Duplicator for WordPress | HollyPryce.com

Click Install Now and then when prompted to, click Activate.

3 | Create a package using the Duplicator plugin

Once you have activated Duplicator you will see a new item in the left-hand menu of WordPress called Duplicator. Hover over this and click Packages.

Duplicator in WordPress | HollyPryce.com

In Duplicator you create packages which are essentially just backups of your website. These packages also come with an installer file which is used when you are moving hosts.

To create a new package, click Create New.

Duplicator package builder | HollyPryce.com

The first step in the process is to set up your package. Start by giving it a suitable name. I recommend leaving all the other settings as they are.

Click Next when you are ready to move on to the next step.

Duplicator package builder | HollyPryce.com

Duplicator will now run a test to make sure it is ready to export your website content.

Hopefully, you will see lots of green boxes that say “Good” like in the image below. If you do see this then click Build to move on to the next step.

Duplicator package builder | HollyPryce.com

If you have any “Notice” warnings, like in the image below, it’s worth taking a look at these to see what you can do to fix them. Sometimes Duplicator will not be able to make a copy of your website if there are issues.

In this example, some of the media files were too large and there was an issue with the caching plugin I was using.

If you want to continue regardless of the warnings, tick the box next to Yes. Continue with the build process! and then click Build.

Duplicator package builder | HollyPryce.com

Duplicator will then begin building your package. This might take some time.

Once it is complete you will see the Package Completed confirmation page. As you will see there are two files to download. The first in the installer file that I mentioned before and the second is the archive which is the backup of your website. The archive file in a compressed zip folder.

Duplicator package builder | HollyPryce.com

You only need to download the achieve file. This may take some time, depending on the size of your website files.

4 | Drag and drop your archive file into Local by Flywheel

Once the archive file has finished downloading, open up Local by Flywheel.

Instead of creating a new local website, you need to drag and drop your archive zip folder (the one you just downloaded from your website) into the Local by Flywheel interface. It could not be simpler!

Importing site from archive into Local by Flywheel | HollyPryce.com

Hopefully, you should then see a page that says Import site from archive. Here you can choose the name for your local site. By default, it will just use the name that Duplicator gives to the file, so you will probably want to change it to something shorter!

When you’re done click Continue.

Importing site from archive into Local by Flywheel | HollyPryce.com

Then you will be prompted to choose your environment settings. I recommend leaving this as Preferred.

Now click Import Site.

Local by Flywheel preferred settings | HollyPryce.com

Local by Flywheel will now work its magic and it will import your WordPress files and database. This may take some time, but don’t close down Local by Flywheel during this importing phase.

5 | Test your local website

When the archive file has been imported into Local by Flywheel, click View Site to preview your website.

View WordPress website in Local by Flywheel | HollyPryce.com

If the process has worked you will see your local website but it will look exactly like your live website. Take a look at the URL and you will see it is different from the URL of your live website.

You can also view your WordPress admin area by clicking Admin.

View WordPress admin area in Local by Flywheel | HollyPryce.com

Again, notice how the URL is different but how everything looks the exactly the same as your live website.

Of course, any changes you make here will not impact on your live website.

If your live website runs on https…

If your live WordPress website runs on https rather than http, you will see a banner at the top of Local by Flywheel that says “Heads-up! Your site is using HTTPS but the Local SSL certificate isn’t trusted”. To fix this, simply click Trust. Then when you view your local website, you will see it runs of https and you don’t get any warnings about the page not being secure.

Trust SSL certificate in Local by Flywheel | HollyPryce.com

Alternatively, if you don’t see this banner at the top of Local by Flywheel, click on the SSL tab and then click Trust.

Trust SSL certificate in Local by Flywheel | HollyPryce.com

Looking for more helpful advice?

Sign up to receive my free monthly newsletter!

On the last Friday of each month, I send out my monthly newsletter jam-packed with tips, tricks and resources to help you create and maintain the WordPress website of your dreams. And it’s completely free!

Simply enter your name and email below to sign up…



You can unsubscribe at any time by clicking the link in the footer of my emails, and I promise never to send you any spam. For more information check out my privacy policy here.

How to create a local copy of your WordPress website | HollyPryce.com


  1. Susanne says:

    Thank you so much for this!!!! I didn’t believe you could import from backups on Flywheel Local but only could create new.. and I’ve had so many problems with restoring from Duplicator on MAMP, plus there’s so much hassles with files and database creation etc.. I was about to ditch Duplicator although I’ve paid for it and recommended my sister to pay for it, because it worked so badly when I needed to restore it locally. This really worked like a charm. Thank you!

  2. Russ says:


    I’ve just started using local by flywheel and Duplicator.
    The method you describe here is exactly what I’ve been doing, but for some reason Flywheel Local isn’t changing the site url.

    I can see it in the database via Local > Adminer.. it’s the same as the live site.
    This will probably explain why when I click ‘view site’ or ‘admin’ from Local, I’m forwarded to the live site.

    Is this something you’ve experienced?
    I don’t think I’ve missed any settings with the import, I’d have thought Local would change the url on the import.


    • Holly Pryce says:

      Hi Russ,

      Is it a particularly large website that you are trying to make a local copy of? I have experienced this exact issue when working with larger websites with a lot of content, so I’m going to rewrite this post in the near future with a different technique that works every time.

      • Russ says:

        Hi Holly

        Thanks for replying.
        They’re not huge websites, each about 20 pages or so.
        Quite a few images in one of them but nothing excessive really.
        The other doesn’t have that much content at all.

        So I guess whatever script is run during the import of the site times out/gives up if it decides the database is too big?
        Not ideal really is it, I’d have thought it could handle the sites I’ve tried.

        Have you found it’s a duplicator problem? Or an issue with flywheel?
        If you are able to let me know what alternates you’re using, that would be great, I could investigate.
        Awesome work putting these guides out anyway, thank you!

  3. Furio says:

    Tried this solution and got a warning by Duplicator, but exported the site. After importing it in Local I had to configure manually wp-config file, because the site was not working. I did it, but the site still doesn’t work and or some reason I’m being redirected to a remote host (my website’s URL).
    What went wrong?

    • Holly Pryce says:

      It sounds like you might need to update your website URL in the database.

      Unfortunately since writing this tutorial I’ve found this method to be a little temperamental. It works ok with smaller websites but not on larger websites. I hope to update this tutorial in the near future, time permitting.

  4. Furio says:

    I hope you can find the time to update this tutorial, since is very interesting! How can I update the URL in the database?

    • Holly Pryce says:

      In Local by Flywheel, you can access the database by clicking on the Database tab of the website you’re working on then click on the “Adminer” button. From here you’ll want to edit the table that ends in _options. Then click Select Data and here you’ll see the option to edit the site URL and the home URL. I hope this helps!

Leave a comment


* = Required. Your email address will not be published.

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