Get DevWP - WordPress Development Theme

How To Duplicate a WordPress Website – Migration or Local Testing

In the video above, I show you how to Duplicate a WordPress Website to your local computer so you can test out WordPress Themes, Plugins and Test Custom Code in a safe environment without impacting your production website. You can also use the tips in the video to migrate your website to a new server. 

I recommend this process because it will minimize any issues on your main website while you’re testing out some changes that you don’t want being reflected on your website till it’s ready for production. You might think it would be hard to completely clone or duplicate WordPress website but it’s actually very easy to do. There are some built in tools that you can use and some free plugins that make the process seamless. Follow the video if you want to see a hands on step by step demonstration.

Steps to Exporting your Content

First Step

On your production website, the one you’re looking to clone aka duplicate, log into your website and then head over to your admin dashboard. Then head to the Tools Section and click on the Export link. Select All your Content and Download the XML Export File. This is what you will use to migrate your content.

This is a seamless process and you’ll find it easier than some other solutions.

Step Two

There are two WordPress Plugins that you will need in order to make it easier to setup your local clone of your production website. So go to the Plugins link in the admin sidebar and click on the add new link.

  1. Customizer Settings
  2. Widget Importer & Exporter Plugin

Search for both plugins, install then activate them. Then go to your Customizer section and export your settings via the Export Import link in the left sidebar. Then for your widgets, in the admin sidebar, click the Tools link, then click the Widget Importer & Exporter link. From there you’ll simply click the exports button.

By following the steps above you will have three files that you can use for your cloning or website migration.

Steps to Importing your Content

Step One

Startup your local web server (I’m using MAMP). Then you will want to get a fresh copy of the WordPress Software from the official website. Download WordPress

Place your download into your web servers root directory. Make sure it’s extracted since you downloaded a zip file of WordPress. Then in your web browser, go to your localhost and visit the database section for phpMyAdmin. Create a new database for your local site. Then visit the url in your web browser. It might be something like localhost/siteclone. The siteclone is the name I gave the local installation in the video above.

You would just follow the prompts to get your local website up and running.

Step Two

Then you should remove the default pages, posts and plugins that come with WordPress. Then set your permalinks to the same structure you use on your website. Then make sure you install the plugins and theme you’re using on your website before you upload your xml, dat and wie files. This is an important step so don’t skip it.

Step Three

Then you’re going to import your three files. I recommend first importing your content via the xml file. Follow these steps.

  • In your local website admin section click on the tools section and then import.
  • You will choose the WordPress option towards the bottom and click install which will get you the WordPress Importer Plugin then Run the importer.
  • Make sure to select your local user account and check off the download your images.

Step Four

Then you’re going to import your Customizer and Widget Settings with the same plugins we used to export them. You’ll basically be reversing the process to what we did above but here are the quick steps.

  • for the widgets, go to the tools section and click the Widget Importer Exporter Link and then follow the steps to importing your widgets.
  • for the customizer, go to your Appearance section and then click customizer. From there just click the import button and follow the prompts.

Clean Up

Once you followed these easy steps, you will have your local website setup just like your production website. You might just need to change your homepage setting to match what you have on your production website and also configure your menus. Once all this is done, you can now have a duplicate of your live website that you can use to test out themes, plugins and custom code.

You can even use the steps above to migrate your website. While there will be additional steps involve, you will find this to be an easy way to migrate your content. I will create a more in depth tutorial on migrating a website so stay tuned for more WordPress Tips and Tricks. Make sure you watch the video and if you found it helpful, subscribe, thumbsup and share.

As always, thanks for reading and watching.

View Our Themes