wordpress发布的文章中特色图片无法显示

编程入门 行业动态 更新时间:2024-10-07 22:29:24

wordpress发布的文章中<a href=https://www.elefans.com/category/jswz/34/1767751.html style=特色图片无法显示"/>

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发布的文章中特色图片无法显示

本文发布于:2024-03-06 16:33:02,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1715804.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:特色   文章   图片   wordpress

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!