略過並前往主要內容
致電我們
服務專線和服務時間
預約回電

無須線上等候,提交預約我們將儘快回電。

預約回電
說明中心

瀏覽我們線上說明資源

說明

GoDaddy 說明

Troubleshoot theme errors in WordPress

WordPress theme errors can result in error messages or blank white pages, which is commonly referred to as a white screen of death. You can use the steps below to diagnose potential WordPress theme errors.

Prepare your WordPress site for troubleshooting:

  1. You should always backup your site before performing any troubleshooting.
  2. Disable all plugins, especially any caching plugins.
  3. If your site uses wp_cache, you will need to disable WP_CACHE.

Look for a theme related error

  1. Enable WordPress debug mode.
  2. Visit your site and check to see if there is a PHP error.
  3. If there is a PHP error, check to see if the themes directory is in the file path. Below is an example:
    Fatal error:  Call to undefined function functionName() in
    /home/wp-content/themes/twentyeleven/functions.php on line 1
  4. If the file path contains themes, then this confirms the issue is with the theme, and you can move on to fixing the error.
  5. If the error is not visible on your website, then you will need to expose the error:
  6. If the detailed errors or logs show a PHP error, then you can begin fixing it.

Determine if the error only occurs with your currently active theme

  1. Connect to your hosting with FTP to upload files.
  2. Navigate to the directory containing your WordPress site.
  3. Then open the wp-content/themes directory.
  4. Make note of the latest default theme that is installed.

    Note: Default WordPress themes are named after the year they were released. For instance, the default theme that came out in 2017 is named twentyseventeen.

  5. Update your WordPress site to use a default theme in the database.
  6. Check your site. If the issue is no longer persisting, then you have successfully determined the issue is with your non-default theme.

Next steps

More Info: