特色图片无法显示"/>
wordpress发布的文章中特色图片无法显示
背景
在使用 wordpress
搭建好网站发布文章时,发现所有文章都无法显示设置的特色图,如下图:
经过查找多个解决方法后,最终解决。
开启GD库
查看 GD Support => enabled
:
php -i | grep -i --color gd
GD库具体有什么用,后续再研究。
更改 cache
权限
在 /wp-content/themes/你的主题
目录下查看 cache
文件夹权限:
ls -lh cache
我的是这样:
total 0
-rw-r--r-- 1 root root 0 Feb 11 19:08 index.html
-rw-r--r-- 1 root root 0 Feb 11 19:08 timthumb_cacheLastCleanTime.touch
接下来更改 cache
和 里面的两个文件权限:
chmod 777 cache
chmod 777 cache/index.html
chmod 777 cache/timthumb_cacheLastCleanTime.touch
只设置了这两部分,我的特色图片可见了。
更多推荐
wordpress发布的文章中特色图片无法显示
发布评论