WordPress: Disable Comment and Ping/Trackback 彻底停用评论/引用功能

Categories: Development NotesWordPress; Tagged with: ; @ May 4th, 2014 12:29


Spam comments try to rape my blog everyday,  I want to disable the comment feature.

Step 1: Disable the comment /pingback/trackback in WordPress admin console:



By un-checking these two boxes, no body can comment or pingback/trackback to the  *NEW* posts from now on.

but,  “(These settings may be overridden for individual articles.)”, this means all your post *prior* to the change still can be commented of pingback, let’s move to next step.

Step 2: Disable ALL posts comment and pingback/trackback

Run this SQL:

UPDATE ‘wordpress_posts’ SET comment_status='closed', ping_status='closed'

From now on, NO ONE can comment / ping / trackback to any post. Life is much better.

If you want to delete all pending/spam comments, you may refer to :  WordPress: batch deleting spam comments 批量删除垃圾回复

Simple WordPress Theme

Categories: Development NotesFrontEndWordPress; Tagged with: ; @ May 1st, 2014 17:18

WordPress default themes are much more complicated than ever, there’re lots of customize features,  functions…. however, I prefer simple themes and that’s why I created  this one:


As a developer, I have my requirement:

I need to know how to change the Style  — but I’m not a web designer;
I don’t need so fat themes, I don’t want spend time to read the codes;
I want to control my blog;

So, I started this theme —  the one I’m using now.

It can :  display the post list, post details, tags, achieves;

It cannot: Comment or display comment;  no UI for customize any thing;


All styles are using default Bootstrap CDN;

How to use

I have no plan to submit it to WordPress.org, so please download the .zip and install it manually:



Source Code:


WordPress: batch deleting spam comments 批量删除垃圾回复

Categories: Development NotesWordPress; Tagged with: ; @ March 16th, 2013 10:50

Use sql to delete all the spam comments quickly:

Status of comment

SELECT DISTINCT comment_approved  FROM `x_comments`


0 – Pending

1 – approved

spam – spam

trash – trash


Deleting SQL

–delete spam & trash:

DELETE FROM `dbName`.`x_comments` WHERE comment_approved = 'spam' or comment_approved = 'trash'
--delete pending:
DELETE FROM `dbName`.`x_comments` WHERE comment_approved = '0'

WordPress: change language 更改语言中文/英文

Categories: Development NotesWordPress; Tagged with: ; @ March 16th, 2013 10:39

Modify the wp_config.php


If you want to change the language to ‘English’


* WordPress Localized Language, defaults to English.
* Change this to localize WordPress.  A corresponding MO file for the chosen
* language must be installed to wp-content/languages. For example, install
* de.mo to wp-content/languages and set WPLANG to ‘de’ to enable German
* language support.
define (‘WPLANG’, ”);


Keep the value empty.



* WordPress 语言设置,中文版本默认为中文。
* 本项设定能够让 WordPress 显示您需要的语言。
* wp-content/languages 内应放置同名的 .mo 语言文件。
* 要使用 WordPress 简体中文界面,只需填入 zh_CN。
define(‘WPLANG’, ‘zh_CN’);


WordPress-Post2Qzone 1.2.2: 同步每一次更新到QZone

Categories: Development NotesWordPress; Tagged with: ; @ January 19th, 2013 14:02

上一周,  收到一条关于Post2Qzone的评论:


一开始我没太理解, 我想可能是他的第二个账户没有设置妥当. 于是发邮件去让他从新测试.










1. Metadata的更新/检查 有bug.

2. 增加新功能: 同步每次更新(暂时没有配置页面, 需要手动修改代码).





Older Posts

// Proudly powered by Apache, PHP, MySQL, WordPress, Bootstrap, etc,.