备份WordPress

准备工作:建议停用所有插件、恢复默认主题

一、程序
一般来说,备份以下文件、文件夹,以及任何您曾经修改过的文件即可
http://domainname/favicon.ico
http://domainname/robots.txt
http://domainname/sitemap.xml
http://domainname/wp-config.php
http://domainname/wp-content/*
其中以下文件、文件夹可忽略
http://domainname/wp-content/index.php
http://domainname/wp-content/plugins/akismet/*
http://domainname/wp-content/plugins/hello.php
http://domainname/wp-content/plugins/index.php
http://domainname/wp-content/themes/default/*
http://domainname/wp-content/themes/classic/*
http://domainname/wp-content/themes/twentyten/*
http://domainname/wp-content/themes/index.php
二、数据库
1、通过主机空间管理后台(cPanel等)可以备份、恢复数据库
2、通过phpMyAdmin可以导出整个数据库,也可以导出数据库的单个数据表
建议既导出整个数据库,也导出单个数据表,如果导入整个数据库无法恢复时可以逐一导入数据表进行恢复
3、文章、页面、评论、分类、标签等数据可以从WordPress后台导出,恢复时从后台导入即可