问题
So I have upgraded to WordPress 3.5 and that seems to have erased all posts and custom post types, media images, sliders etc.
I have made a backup using both pressbackup and backupbuddy but when I try to restore the database (or everything). When it is done, if I look at the front end, everything is back and looks great but then when I go to the back end it says the database needs to be upgraded and doesn't let me bypass that. If i click OK it prompts the following message and after that everything is wiped again:
WordPress database error: [Table 'db446353270.wp_categories' doesn't exist] SELECT * FROM wp_categories ORDER BY cat_ID
WordPress database error: [Table 'db446353270.wp_post2cat' doesn't exist] SELECT post_id, category_id FROM wp_post2cat GROUP BY post_id, category_id
WordPress database error: [Table 'db446353270.wp_linkcategories' doesn't exist] SELECT cat_id, cat_name FROM wp_linkcategories
WordPress database error: [Unknown column 'link_category' in 'field list'] SELECT link_id, link_category FROM wp_links
Please advise.
Thanks
回答1:
You can't restore the database to a backup of a past version of Wordpress and run a future version of Wordpress at the same time. In less complicated words, the database must be configured with the same version (i.e. v3.5) as the front-end (i.e. v3.5).
You may want to consider downgrading the frontend back to the version of Wordpress that was used before upgrading by overwriting the files via FTP. You can access and download the past versions of Wordpress here. Then, attempt upgrading to the latest version of Wordpress using the Upgrade Utility in the Administrator Dashboard.
If you encounter the same issue again, this means that one or more of your installed plugins or themes is incompatible with the latest version of Wordpress. You will have to either downgrade again and wait until the theme/plugin author(s) release an updated version or disable the conflicting theme/plugin entirely.
回答2:
I think the best you can do at this moment is to downgrade to previous version:
.1 Make a backup of the installed WP.
.2 Check the WP database for errors and make a single backup of it in case you have to restore it in the future.
.3 Download the 3.4.2 version for updates, from here, assuming that was the version. If not, replace 3.4.2 in the link to the correct version.
.4 Unpack over your actual WP installation.
.5 Accept when asked to update the database.
.6 Log in and check the plugins to see if one of them is the problem, specially those that modify in any way the categories because from the error messages there is a problem with them.
.6 Don't update again without previously disabling the plugins and only when you are ready to take the risk.
来源:https://stackoverflow.com/questions/13925312/upgrading-to-wordpress-3-5-erased-all-posts-and-pages-wiped-database