wordpress升级后样式不能加载

wordpress升级到4.9.4时,发现在管理后台不能添加编缉文章,点到相应页面里,样式内容一片空白原生态。

分析网络加载发现,页面在加载资源时出现,

Failed to load resource: net::ERR_INCOMPLETE_CHUNKED_ENCODING

再看,这些是资源是通过php后台加载,load-styles.php和load-scripts.php两个文件。

跟踪分析nignx日志,看到

2018/02/08 16:18:36 [crit] 25638#0: *1590 open() “/wwwx/nginx/proxy_temp/6/15/0000000156” failed (13: Permission denied) while reading upstream, client: 120.xxx.xx.147, server: www.xxx.com, request: “GET /wp-admin/load-scripts.php?c=0&load%5B%5D=hoverIntent,common,admin-bar,heartbeat,autosave,wp-ajax-response,jquery-color,wp-lists,quicktags,jquery-query,admin-comments,sug&load%5B%5D=gest,jquery-ui-core,jquery-ui-widget,jquery-ui-mouse,jquery-ui-sortable,postbox,jquery-ui-position,jquery-ui-menu,wp-a11y,jquery&load%5B%5D=-ui-autocomplete,tags-suggest,tags-box,underscore,word-count,post,editor-expand,thickbox,shortcode,backbone,wp-util,wp-backbone,&load%5B%5D=media-models,wp-plupload,wp-mediaelement,wp-api-request,media-views,media-editor,media-audiovideo,mce-view,imgareaselect,image-e&load%5B%5D=dit,svg-painter,wp-auth-check,editor,wplink,media-upload,wp-embed&ver=4.9.4 HTTP/1.1”, upstream: “http://127.0.0.1:88/wp-admin/load-scripts.php?c=0&load%5B%5D=hoverIntent,common,admin-bar,heartbeat,autosave,wp-ajax-response,jquery-color,wp-lists,quicktags,jquery-query,admin-comments,sug&load%5B%5D=gest,jquery-ui-core,jquery-ui-widget,jquery-ui-mouse,jquery-ui-sortable,postbox,jquery-ui-position,jquery-ui-menu,wp-a11y,jquery&load%5B%5D=-ui-autocomplete,tags-suggest,tags-box,underscore,word-count,post,editor-expand,thickbox,shortcode,backbone,wp-util,wp-backbone,&load%5B%5D=media-models,wp-plupload,wp-mediaelement,wp-api-request,media-views,media-editor,media-audiovideo,mce-view,imgareaselect,image-e&load%5B%5D=dit,svg-painter,wp-auth-check,editor,wplink,media-upload,wp-embed&ver=4.9.4”

我们发现权限问题:

failed (13: Permission denied)

到/wwwx/nginx/proxy_temp/目录下,原来当前nignx运行非www,而是其他用户。

修改,wordpress恢复正常。

发表评论