Need help? Book our fixed price WordPress Support service.

Create a Local Copy of a WordPress Website

To get a local copy of a WordPress website you will need to follow these steps.

In the first instance, make sure you have WAMP, MAMP or LAMP installed (Apache, MySql,PHP). You should also install phpMyAdmin and have that running locally. There are lots of guides onthe web for this. You will also need Filezilla FTP client (or similar) and access to an FTP account on site you are cloning, and access to phpmyadmin.

Create a fresh WordPress install on your local computer and check it all works

Automatic Clone

Note this will not work on larger sites.

  1. Install the plugin WP Clone on both the site you are cloning and the local WordPress install
  2. In the WP Clone menu item click Backup Site.
  3. Copy the URL provided by WP Clone to your clipboard
  4. On the local install, paste the URL to WP Clone > Restore fromBackup. Be very careful and double check – if you do this on the wrong site you will destroy the website!

WP Clone will do all the hardwork such as updating internal URLs but it won’t work for larger sites.

Manual Clone

  1. Create a blank install of WordPress on your local computer and check it works
  2. Rename the wp-content directory to wp-content.orig
  3. Download the wp-content directory from the site you are cloning to to replace the wp-content directory you have just renamed
  4. Login to phpmyadmin on the target site and export the database.
  5. On the local machine, dump out the tables from the WordPress database (you may want to export first as a backup) to empty the database
  6. Import the database from the website you are cloning
  7. You will then need to update the Site URL and Home URL to reflect your local installation. You can add the following lines to your wp-config.php file, adapting as required:
    define('WP_HOME','http://example.com');
    define('WP_SITEURL','http://example.com');

Without Access to FTP

You will essentially be following thte steps of the manual clone above, however you will need to get the files in a different way:

  1. Install Updraft Plus on site to be cloned and run a files and database backup.
  2. Download all backup files: there will be a database backup as well as plugins, themes, uploads, other (and maybe a few more).
  3. Create a new wp-content directory within your local installation and unzip the contents of the zip files to here
  4. Upload the database backup

Was this article helpful?

No 0

About the Author

Christian Mayne is a full time WordPress developer and consultant based in the UK. He runs a UK based WordPress development agency with clients all over the World. As well as WordPress development, Christian has been teaching WordPress use and development since 2014 in classroom settings and online.

LEAVE COMMENT