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
Note this will not work on larger sites.
- Install the plugin WP Clone on both the site you are cloning and the local WordPress install
- In the WP Clone menu item click Backup Site.
- Copy the URL provided by WP Clone to your clipboard
- 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.
- Create a blank install of WordPress on your local computer and check it works
- Rename the wp-content directory to wp-content.orig
- Download the wp-content directory from the site you are cloning to to replace the wp-content directory you have just renamed
- Login to phpmyadmin on the target site and export the database.
- 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
- Import the database from the website you are cloning
- 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:
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:
- Install Updraft Plus on site to be cloned and run a files and database backup.
- Download all backup files: there will be a database backup as well as plugins, themes, uploads, other (and maybe a few more).
- Create a new wp-content directory within your local installation and unzip the contents of the zip files to here
- Upload the database backup