You don’t really need a local copy to restore your site, what you need is a full backup. A full backup will include all the data (posts, settings, etc.) from your database, as well as all the files (plugins, themes, uploaded files).
There are several free plugins in the repository to do this, and some well-respected premium ones. Look for one what will automatically backup your site and send the backup to a remote location (like Dropbox or Amazon S3). You will want to store multiple copies of your backups so that you can try to go back to before you were hacked.
Hi Bet,
Thank you very much for your kind reply.
I did have a full-backup, although, unfortunately, at the time, it wasn’t done often enough. Having learned my lesson now, I have used a paid solution of “Site Backup Pro” offered by Bluehost to backup my site regularly.
Having said that, I still thought that having a local copy might be useful too, such as when I needed to test a new theme or a new layout or new plugins before I made it live on my website.
Are there actual ways to clone from live site to local copy?
Again, thanks and I really appreciate your response.
Hi,
Open dashboard -> Go to tools-> Export-> Choose all content-> Download export file.
Downloaded file should be with .xml extension.
Install new WordPress->create db for this->open dashboard after this->go to tools to imports that xml file.->import->
You might need to install import plugin after that, and then select this option, ‘all the content,post and pages’.
Now Select the desired theme,
Dear all,
Thanks very much for your help and your suggestions.
I have successfully reproduced my live website on my local computer.
I actually almost reversed the steps provided in this tutorial:
http://www.wpbeginner.com/wp-tutorials/how-to-move-wordpress-from-local-server-to-live-site/
In fact, there were plenty of other links and tutorials that should have allowed me to do the same thing if I followed it properly. What they didn’t seem to tell me is that when I changed the link to point to my localhost url, I need to put in the port number too.
thus if my website is “http://suwandytjin.com” and I need to change the database entry within the table “{prefix}_options} for siteurl and home to the localhost url, I need to put “http://localhost:81/wp”, where 81 is the port number for Apache as configured within MAMP and my wordpress folder is wp
Hope that helps for anyone else looking to do the same thing
What they didn’t seem to tell me is that when I changed the link to point to my localhost url, I need to put in the port number too.
This is not a default requirement and is only needed if one has changed the default port settings.
where 81 is the port number for Apache as configured within MAMP
Port 81 is not the default MAMP port for Apache; 8888 is the default 🙂
I point out these items so that others reading this do not get confused as the OP is using a non-default port number for MAMP.
Dear @lylechamney,
Much appreciated for your kind comment to point this out for me and for future readers =) .
I’m afraid, however, that previously even when I used the default port number of 8888, it kept giving me the 404 “the url is not available / not found error”. It was only after I used port 81 with MAMP (which still gave me the same 404 error by the way), where I tried to put in the port 81 into the database entry that it eventually run properly.
Was there something else that I may have missed?