views:

179

answers:

5

My Wordpress blog appears to have been hacked and now blogs do not save and any changes I make such as approving a comment do not have effect. I am trying to backup my website so as to uninstall wordpress and perform a clean re-instillation. I want to create a backup so that when i restore the website will appear with everything the same as before: posts, images, links, colors, comments, themes, pages, etc. I have already backed up the MySQL database successfully. How do i backup the rest of the site.

Please tell me how to backup the site and also how to restore the site.

Thanks

+2  A: 

You need to backup both your database and your Wordpress installation. The main resource to use for this is the Wordpress site:

http://codex.wordpress.org/WordPress_Backups

If you have phpmyadmin installed you can do a database dump from ther. If you don't have this installed then use mysqldump.

Wordpress installation backup can be initiated through the following URL:

http://[yourwordpressurl]/wp-admin/export.php

That will contain "your posts, pages, comments, custom fields, categories, and tags".

Jon
A: 

best thing to do is to manually copy the database, as wordpress restore has an upload limit on the built in restore function. so if you've been blogging for a while, this can be really bad.

mysqldump -u yourUsername -p yourDatabaseName > databaseName.sql

will create the file databaseName.sql this is a full clone of all your database info (all your posts & wordpress configs)

then you can restore later with

mysql -u yourUsername -p yourDatabaseName < databaseName.sql
mdskinner
A: 

I figured it out. One way to cleanly install a new version of Wordpress but not lose your website is the use the Wordpress export feature as mentioned by Jon.

http://codex.wordpress.org/Tools_Export_SubPanel

This exports your blog to an XML file that contains all content of your site: posts, comments, authors, pages, etc. However, images do not go with. However when importing this XML file there is an option to download and import the attachments automatically which can be done if the original site is still online. So what I did is export my XML file, upload it to a wordpress blog installed on a subdomain automatically getting the attachments, then export an XML file from the subdomain to import into the actual wordpress site. This way my attachments were simply moved around from site to subdomain back to site. This made it easy because I did not have to handle backing up my attachments manually.

So what I did was back up my theme, export my blog to XML, then delete wordpress and my database then reinstall it with a new database on both my site and a subdomain of my site. Then I imported my XML file and put my theme in the themes folder of the subdomain. Then I exported an XML file of this subdomain copy of my site and imported it into my real site. This made my blog have all the content correct and the theme right but none of the links, plugins, or colors correct. I then had to customize wordpress through the panel to get it back to the look and feel it was. For this It was lucky I had a stored copy of the site to refer to.

This process was long because I actually had to rebuild my site twice, one for the subdomain and then again for the actual thing. But it fixed my problems.

Kayton