Wordpress 迁移问题 503 错误
Posted
技术标签:
【中文标题】Wordpress 迁移问题 503 错误【英文标题】:Wordpress Migration Issue 503 error 【发布时间】:2018-12-13 14:21:36 【问题描述】:最近我修改了一个在开发服务器上创建的网站。然后,我开始将它迁移到主服务器上。最初,在实时服务器上上传数据库时出现 unicode 错误。我用谷歌搜索并找到了堆栈溢出本身的解决方案(#1273 – Unknown collation: ‘utf8mb4_unicode_520_ci’)。我使用了 sabba 建议的方法,它奏效了。后来当我更改配置文件并加载该链接时。它给了我一个503错误..它的错误如下:
服务不可用
由于维护停机或容量问题,服务器暂时无法满足您的请求。请稍后再试。
此外,在尝试使用错误文档处理请求时遇到 503 Service Unavailable 错误
【问题讨论】:
检查主文件夹中的 error_log。 【参考方案1】:完成这些步骤并检查它,
启用 WP_DEBUG
But since the 503 error often locks you out of your WordPress admin, we shall use WP_DEBUG and WP_DEBUG_LOG, WP_DEBUG_DISPLAY and @ini_set constants available to WordPress.
To enable debug mode in WordPress and write errors to a log file, follow these steps:
1. Open the wp-config.php file
2. Scroll down to where WP_DEBUG is defined. It looks like this define ('WP_DEBUG', false);. If it is missing, we will add it just above the line that says /*That's all, stop editing! Happy blogging.*/
3. Insert the DEBUG magic codes. Just change the above define ('WP_DEBUG', false); code to:
define ('WP_DEBUG', true);
define ('WP_DEBUG_LOG', true);
define ('WP_DEBUG_DISPLAY', false);
@ini_set ('display_errors', 0);
4. Save changes
Now, reload your site to provoke the error. Next, locate a file known as debug.log inside your wp-content folder in your WordPress directory.
This file contains all the errors on your website. If your 503 service unavailable error is caused by a custom code snippet, it will show up somewhere with details of the error.
Eliminate/replace the problematic code and reload your site. If the 503 error persists, the problem could lie in your web server.
【讨论】:
以上是关于Wordpress 迁移问题 503 错误的主要内容,如果未能解决你的问题,请参考以下文章
Wordpress 503 错误 - 如何从我的网站中删除 rocket-loader.js?