要还原数据以联系表格7,WordPress [英] Want to restore data to contact form 7, wordpress

查看:62
本文介绍了要还原数据以联系表格7,WordPress的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的网站被黑了,最后我不得不删除整个WordPress安装和数据库.我现在最大的问题是,我使用了具有大量联系人的Contact Form 7,并且由于我必须创建一个新联系人,因此不再存在于数据库中.我确实设法对包含联系表单数据(如SQL和XML)的表进行了备份.但是我不知道是否可以将数据从备份表恢复到新表吗?我不想删除新表并将其替换为备份的表(并更改表的名称),因为我不确定约束是否获得正确的名称,依此类推.该数据库是通过phpMyAdmin的MySQL

My site got hacked and in the end I had to remove the entire WordPress installation and database. My biggest problem now is that I used the Contact Form 7 with a very large number of contacts and it is no longer in my database since I had to make a new one. I did manage to make a backup of the tables containing the contact form data (as SQL and XML). But I don't know if it's possible to restore the data from the backed up tables to the new ones? I don't want to drop the new tables and replace them with the backed up ones (and alter the names of the tables), because I'm not sure if the constraints get the correct name and so on. The database is MySQL via phpMyAdmin

因此,从本质上讲,我想将数据从一个表移动到新表!有可能吗?

So, essentially I want to move data from one table to a new! Is it possible?

Så我用新名称导入了旧的联系表单表格,但是它不起作用.但是,当我恢复为旧版本的联系表时,它可以工作.似乎版本处理和存储数据的方式有所不同.但是现在我不能升级它!一旦我这样做,我所有的联系人都将消失.有谁知道如何修复它,或者为什么它会这样工作?

Så I imported the old contact form tables, with new names, and it didn't work. BUT, when I reverted to an older version of contact form, it worked. Seems there is a difference in how the versions handle and stores the data. But now I can't upgrade it! As soon as I do, all my contacts disappear. Does anyone know how to fix it, or why it behaves this way?

推荐答案

联系表7将其所有数据保存在wp_contact_form_7表中(假设您的表前缀为wp_),并且不会将表单分配给具有典型数据库键关系的页面.相反,它将在您的页面内容中放置一个标记,该标记将被插件解释并替换,并根据在您的帖子中找到的名称来呈现适当的表单.

Contact Form 7 holds all its data in wp_contact_form_7 table (assuming your table prefix is wp_) and doesn't assign forms to pages with a typical database key relationship. Rather, it will place a marker in your page content that gets interpreted and replaced by the plugin and renders the proper form based on the name it finds in your post.

假设您的所有页面&帖子已经像以前一样被导入到新数据库中,并且您已经启用了CF7作为插件,您应该能够将旧的contact_form_7表从phpMyAdmin导入到新数据库中.

Assuming all your pages & posts have been imported back into your new DB the way it was before, and you've already got CF7 enabled as a plugin, you should be able to import the old contact_form_7 table into your new database from phpMyAdmin without issue.

一如既往,还应备份新数据库,以防出现问题.

As always, make a backup of your new database as well in case something goes wrong.

这篇关于要还原数据以联系表格7,WordPress的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆