500将本地主机移至服务器后,所有页面和POST均出现错误

时间:2019-09-26 作者:GHOST

今天,我移动到服务器的本地文件夹,之后我的页面和帖子出现了500个错误

但在主页上,一切都很好,但其他链接不起作用

what i did?

<添加apache2 conf和点域编辑的数据库(checghttp://localhost/triber 至realdomian)

what happen after that?

唯一的主页正在运行良好的图像正在显示其他帖子,但其他链接不起作用

error messages

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator at [no address given] to inform them of the time this error occurred, and the actions you performed just before this error.

More information about this error may be available in the server error log.
我的问题也有同样的问题

1.Can\'t access wp-admin Internal Server Error 500

2.500 Internal Server Error after Register dialog, but with successful registration

3.500 Internal server error after changing php version

4.500 error after WordPress homepage URL changed

5.Wordpress HTTP 500 Error

6.500 Internal Server Error after attempting to switch from subdirectory to addon domain

1 个回复
最合适的回答,由SO网友:Regolith 整理而成

首先在配置中更改数据库名称、用户名和密码。php文件

/** The name of the database for WordPress */
define(\'DB_NAME\', \'DB_NAME\');

/** MySQL database username */
define(\'DB_USER\', \'DB_USERNAME\');

/** MySQL database password */
define(\'DB_PASSWORD\', \'DB_PASSWORD\');
然后上载数据库并运行以下查询,这将更改指向您的live url的所有本地链接

UPDATE wp_options SET option_value = replace(option_value, \'http://www.oldurl\', \'http://www.newurl\');

UPDATE wp_posts SET guid = replace(guid, \'http://www.oldurl\',\'http://www.newurl\');

UPDATE wp_posts SET post_content = replace(post_content, \'http://www.oldurl\', \'http://www.newurl\');

UPDATE wp_postmeta SET meta_value = replace(meta_value,\'http://www.oldurl\',\'http://www.newurl\');
在此wp管理员工作后,登录并转到设置>永久链接,点击保存,将重置重定向。

enter image description here

相关推荐

为什么dbDelta()不能捕获MysqlErrors?

据我所见,dbDelta() 用于抑制在其操作过程中发生的数据库错误。一般来说,情况似乎是这样,但New Relic仍在报告函数中的MysqlErrors。准确的错误消息格式如下:MysqlError: Table \'xxx.wp_yyy_posts\' doesn\'t exist 发件人dbDelta() 在里面/wp-admin/includes/upgrade.php, 我们有:// Fetch the table column structure from the database&