zwillhill
V2EX  ›  WordPress

wordpress 弄了个子主题,结果变成空白页了, 500 错误

  •  
  •   zwillhill · Jun 27, 2017 · 2984 views
    This topic created in 3281 days ago, the information mentioned may be changed or developed.
    本地用 xampp 测试的子主题:文件夹里只有 style.css 和 functions.php,预览和使用一切正常。
    阿里云 ecs 用的 lnmp,一样的子主题,预览的时候一片空白,点了下启用,于是乎前后台都空白了——还好把子主题改了名字,wordpress 恢复默认主题。

    预览空白页 F12 显示:customize.php?theme=子主题名字&return=%2Fwp-admin%2Fthemes.php 500 错误

    一般的主题都正常。

    网上的说法是和缓存插件有关?禁用缓存、删除缓存文件无效( WP Super Cache 插件)
    zwillhill
        1
    zwillhill  
    OP
       Jun 27, 2017
    开启 wordpress debug,显示父主题的 functions.php 有问题,有一些自己添加的设置,子主题里也用了——删掉父主题里的添加的设置,恢复正常。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2437 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 32ms · UTC 10:33 · PVG 18:33 · LAX 03:33 · JFK 06:33
    ♥ Do have faith in what you're doing.