首页 > 解决方案 > Wordpress 迁移问题 503 错误

问题描述

标签: databasewordpressmigration

解决方案


完成这些步骤并检查它,

启用 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.

推荐阅读