WordPress:在线移动网站 500 内部错误
嗨嗨,在本地主机上有一个工作网站,我想将其转移到网上。 我正在使用 WP 3.2.1,并从本地主机导出数据库。 之后,我只需使用文本编辑器打开 .sql 文件,并将所有“http://localhost/mysite”替换为“http://mynewdomain.com”。 之后,我在线编辑了新目标数据库的 wp-config.php 文件,因此我将所有内容上传到网上。 我可以正确地看到index.php页面(除了西班牙语、中文等字符被破坏)和其他一些部分,但如果我尝试访问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>
已解决: 我必须启用输出缓冲,一切又恢复正常了!
Hi Hi have a working website on localhost that I want to move online.
I'm using WP 3.2.1 and I exported the DB from my localhost.
After that I just opened the .sql file with a text editor and replaced all of the 'http://localhost/mysite' with 'http://mynewdomain.com'.
After that I edited the wp-config.php file for the new destination DB online,and so I uploaded everything online.
I can see the index.php page correctly (apart from espanol,chinese etc characters broken) and few other secitons but if I try to reach the wp-admin section ..and whenever i try to browse to any another site's section I get the following error:
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
My 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>
SOLVED: I had to enable the output buffering and everything is fine again!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
尝试暂时删除您的
.htaccess
文件,看看是否可以再次访问您的管理员。恢复
.htaccess
并尝试添加:到
wp-config.php
的顶部,如果这不起作用,您还可以尝试将下面的代码添加到wp-config.php
希望您能收到一些错误消息,告诉您发生了什么。
Try to temporary remove your
.htaccess
file and see if you can access your admin again.Restore you
.htaccess
and try adding:into the top of your
wp-config.php
if this doesn't work you also try adding the code below to the bottom of thewp-config.php
and hopefully you get some error messages telling you what is going on.
将 WordPress 站点从一个域移动到另一个域时刚刚遇到类似的问题(错误 500 - 未找到页面)。
显然,在模板文件中开始
声明之前发现了一个空白字符。
您可以通过在
index.php
中插入exit("wtf")?
并“WTF-ing”到受影响的文件来跟踪错误。就我而言,原因是从基于 Apple 的操作系统迁移到 Windows,其中 CR/LF 处理存在差异。
Just had a similar problem when moving a Wordpress site from one domain to the other (Error 500 - page not found).
Apparently a whitespace character found its way before the beginning
<?php
declaration in a template file.You can trace the error by inserting a
exit("wtf")?
inindex.php
and "WTF-ing" your way to the affected file.In my case, the reason was a move from Apple-based OS to Windows with differences in CR/LF handling.