1

我刚刚将一个站点复制到一个新的开发子域以进行一些更改。副本很顺利。我使用了 rsync 并且所有文件都已就位。我转储了数据库内容并加载了它们。

此外,我修改了 wp-config.php,使其具有:

define('WP_HOME','http://www.dev.newdomain.tld');
define('WP_SITEURL','http://www.dev.newdomain.tld');
// Just trying to catch any error info:
define('WP_DEBUG', true);
define('WP_DEBUG_LOG', true);
define('WP_DEBUG_DISPLAY', false);
@ini_set('display_errors',0);
define('SCRIPT_DEBUG', true);

帖子、插件、用户等都在 wp 管理界面上显示得很好,但是前端没有显示任何内容。

如果我从 wp 管理员修改一篇文章,它编辑得很好,但是当我尝试查看一篇文章时,我在浏览器中得到以下信息:

Not Found

The requested URL /path-to-article/ was not found on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

在我的 apache error.log 中有以下内容:

[Tue Feb 05 05:50:07 2013] [error] [client xxx.xxx.xxx.xxx] File does not exist: /home/username/dev.domain.tld/path-to-post
[Tue Feb 05 05:50:07 2013] [error] [client xxx.xxx.xxx.xxx] File does not exist: /home/username/dev.domain.tld/missing.html

这部分让我相信这可能是 apache 的 .htaccess 发生的事情,但看起来还不错:

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

是的,我已经禁用了所有插件,看看那里是否会发生什么。此外,将主题更改为默认的“Twenty Twelve”也无济于事。

此外,在查看生成的页面源时,html 中根本没有内容。

我所看到的只是网络浏览器访问日志中对根/站点资源的单一访问,没有伴随其他资源(文件、图像等)

当我似乎陷入僵局,日志中没有任何错误时,这里会发生什么?

4

1 回答 1

-1

检查您的数据库。Wordpress 将许多 URL 存储为绝对 URL,这就是您可能遇到问题的原因。

于 2013-02-05T14:54:17.347 回答