1

嗨嗨,我想在 localhost 上有一个工作网站,我想在线移动。我正在使用 WP 3.2.1 并从本地主机导出数据库。之后,我只是用文本编辑器打开了 .sql 文件,并将所有的 'http://localhost/mysite' 替换为 'http://mynewdomain.com'。之后,我在线编辑了新目标数据库的 wp-config.php 文件,因此我在线上传了所有内容。我可以正确地看到 index.php 页面(除了 espanol、chinese 等字符损坏)和其他几个部分,但是如果我尝试访问 wp-admin 部分..并且每当我尝试浏览到任何其他站点的部分时,我都会得到以下错误:

Warning: Cannot modify header information - headers already sent by (output started at /web/htdocs/www.***.it/home/wp-content/themes/ottaviano/shortcodes.php:55) in /web/htdocs/www.***.it/home/wp-includes/pluggable.php on line 934

我的 htaccess

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

已解决:我必须启用输出缓冲,一切又好了!

4

2 回答 2

2

尝试暂时删除您的.htaccess文件,看看您是否可以再次访问您的管理员。

恢复您.htaccess并尝试添加:

define('WP_DEBUG', true);

wp-config.php如果这不起作用,您还可以尝试将下面的代码添加到您的顶部wp-config.php

ini_set('display_errors',1);
error_reporting(E_ALL);

并希望您收到一些错误消息,告诉您发生了什么。

于 2011-11-24T00:47:44.623 回答
0

将 Wordpress 站点从一个域移动到另一个域时遇到了类似的问题(错误 500 - 找不到页面)。

显然,一个空白字符<?php在模板文件中的开始声明之前找到了它的方式。
您可以通过在受影响的文件中插入一个exit("wtf")?inindex.php和“WTF-ing”来跟踪错误。

就我而言,原因是从基于 Apple 的操作系统迁移到 Windows,但在 CR/LF 处理方面存在差异。

于 2016-03-02T11:14:02.230 回答