%title缩略图

WordPress一次性清空回收站的办法

WordPress回收站里有很多陈旧文章或者草稿,此时需要删除手动很花费时间,而且很累,通过数据库SQL命令,我们来轻松完成。

解决办法:

登录数据库管理后台,找到网站对应的数据库,在SQL中输入并执行以下语句:

delete from wp_posts where post_status="trash";

此外,一次性删除文章草稿的SQL语句为:

delete from wp_posts where post_status="draft";

如果想批量删除所有文章或者草稿:

delete
from
wp_posts
using
wp_posts,
wp_term_relationships,
wp_term_taxonomy
where
wp_posts.id=wp_term_relationships.object_id
and
wp_term_relationships.term_taxonomy_id = wp_term_taxonomy.term_taxonomy_id
and
wp_term_relationships.term_taxonomy_id = 1

提示:操作数据库前,记得备份数据库,安全首要。

%title缩略图

XSHELL 数字小键盘乱码不能使用的解决办法

在 Xshell 中文版上用 vi 编辑器时,输入小键盘上的数字键,结果出现的不是数字,而是一个字母然后换行。

我们常用的键盘是带数字键盘区的(也就是右手边的 1~9 的数字键盘),在 Xshell 中文版的使用中可能出现使用数字键盘出现乱码的情况。

解决方法:

打开 Xshell,点击“属性”,打开对话框。

在类别中选择“VT 模式”,然后在右侧的选项中,选择:初始数字键盘模式中的“设置为普通”。点击确定,然后重新打开 Xshell(一定要重启 Xshell 才能生效),再使用 Xshell 时就会发现数字小键盘可以正常输入数字了。

%title缩略图

Nginx的Z-Blog的伪静态配置方法

server {
listen 80;
server_name zzvips.com blog.zzvips.com www.zzvips.com;
root /www/web/www_zzvips_com/public_html;
index index.html index.php index.htm;
error_page 400 /errpage/400.html;
error_page 403 /errpage/403.html;
error_page 404 /errpage/404.html;
location ~ .php$ {
proxy_pass http://127.0.0.1:88;
include naproxy.conf;
#include ./rewrite/z-blog_nginx.conf;
rewrite ^/post/([0-9]+).html$ /index.php?id=$1 last;
rewrite ^/([0-9]+).html$ /index.php?id=$1 last;
rewrite ^/(?:page_)?([0-9]*).html$ /index.php?page=$1 last;
rewrite ^/category-([0-9]+)(?:_)?([0-9]*).html$ /index.php?cate=$1&page=$2 last;
rewrite ^/date-([0-9-]+)(?:_)?([0-9]*).html$ /index.php?date=$1&page=$2 last;
rewrite ^/author-([0-9]+)(?:_)?([0-9]*).html$ /index.php?auth=$1&page=$2 last;
rewrite ^/tags-([0-9]+)(?:_)?([0-9]*).html$ /index.php?tags=$1&page=$2 last;
} 
location / {
try_files $uri @apache;
}
location @apache {
proxy_pass http://127.0.0.1:88;
include naproxy.conf;
} 
}

 

%title缩略图

怎样让zblog网站的速度变快?

怎样让zblog网站的速度变快?

有很多用户非常喜欢在后台安装特别多的插件,

每个插件都有一定的功能,请一定要弄清楚你需不需要插件提供的功能?如果可有可无,请务必不要安装。

再然后:选一个靠谱的主题

一个好的主题,代码工整,逻辑清楚,页面无错误,查询数据库分配合理。

我在这里提供一个方法:在保证没有插件干扰的情况下,启用主题后打开你的网站—鼠标放到页面空的地方点击右键—点击“查看页面源代码”—拉到最底下,可以看到如下代码:

%title插图%num

一共有4个数值,分别是:打开页面时间;查询数据库次数;页面大小;页面错误数量。

通过这4个数值就能判断主题是否合理。测试之前请停用掉除程序自带插件以外的所有插件以排除数据干扰。

最后:用生成静态插件!

这是最后的绝招了。

zblog默认是动态页面,打开一个页面都要向服务器请求查询数据的,如果全部生成纯静态的html文件,那么打开速度会快上很多的。

zblog是没有生成纯静态功能的,需要购买收费插件实现,请在后台–应用中心里面搜索“纯静态”来购买相应插件使用此功能。