解决“One or more database tables are un..”

建站评论3,539阅读模式

安装或者还原备份Wordpress网站的时候,如果遇到One or more database tables are unavailable. The database may need to be repaired。

 文章源自原紫番博客-https://www.yuanzifan.com/53560.html

但这里的点击修复一般会遇到问题,提示没法修复。文章源自原紫番博客-https://www.yuanzifan.com/53560.html

这是因为在wp-config.php文件之中,默认禁止外界对数据库的操作。文章源自原紫番博客-https://www.yuanzifan.com/53560.html

这时你需要打开根目录下的Wp-config.php文件。文章源自原紫番博客-https://www.yuanzifan.com/53560.html

在里面添加如下代码:文章源自原紫番博客-https://www.yuanzifan.com/53560.html

define('WP_ALLOW_REPAIRE',true);

保存文件。随后刷新页面,再次点击repair链接后,即可进入数据库检查和修复的页面。文章源自原紫番博客-https://www.yuanzifan.com/53560.html

在修复的页面会报各种各样的数据库错误的详细信息,几乎每个人遇到的问题都不一样。将对应的问题找出来改掉,即可修复网站。文章源自原紫番博客-https://www.yuanzifan.com/53560.html 文章源自原紫番博客-https://www.yuanzifan.com/53560.html

 

发表评论

匿名网友
:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:
确定

拖动滑块以完成验证