Speeding Up WordPress with APC Object Cache and WP Super Cache

WordPress can be very fast after some (small) effort on performance optimization with the help from its plenty of plugins. Two of the directions are using cache to cut down the number of database queries and optimizing PHP’s performance with opcode cache. In this post, we introduce how to speed up WordPress with APC object cache and page cache with the two plugins “APC Object Cache Backed” and “WP Super Cache”. » Read more

Effective Anti-Spam in WordPress with Plugins

WordPress has a very rich set of plugins and a combination of them can make anti-spam in WordPress quite easy. Here is a list of plugins that can help prevent spammers from registering spam account (if the site allows registration of new users) and posting spam comments. Anti spam comments ∞ Use the Akismet WordPress plugin. Akismet is a Web service that automatically detects comments and trackback spams. » Read more

BBCode Support in WordPress

BBCode is another markup language to format posts widely by forums, which is easier and clearer than HTML. WordPress provides a visual editor and some easy-to-use tools, but no built-in BBCode support. Let’s see how to add BBCode support in WordPress. We can add BBCode support to WordPress with the BBCode plugin by bOingball that extends the BBCode plugin by Viper007Bond. » Read more

WordPress: Disabling Visual Editor

The visual editor provides a visual editor to write and format posts. However, it tries to format the HTML tags written in the HTML editor when turning to the visual editor, and may delete some HTML tags and screw up HTML tags. Even when we set the editor to HTML editor, WordPress may automatically turn back to visual editor next time when we edit a post. » Read more

Controlling Display of WordPress Widget with PHP Code

I am always wondering how to display different Widgets in WordPress depending on the page/post/category etc. I ever tried some plugins that is for specific purpose. However, they are not flexible enough for all my needs. For example, I want a widget that contains AdSense ad not display on certain posts that I selected and marked by the post meta, which is not easy to control with some plugins that only support limited integrated controlling options. » Read more

WordPress MU: Changing Domain Names

There is no automatic built-in method/function in WordPress to change a multi-user WordPress’s domain name. I faced this problem when I tried to add ‘www.’ to the domain name. Hopefully, many people have this problem and give out pretty good solution. Oremj integrate the DB changes needed into one PHP script, which is quite convenient and works well for me: http://blog.mozilla.org/oremj/2009/10/27/wordpressmu-changing-domain-names/. » Read more

Changing the Font Size of WordPress’s Visual Editor

The font size of WordPress’s visual editor is too small for me on my screen display. The default font size is 13px which is hard for my eye on my screen. There are two ways to change the default font size in the visual editor. One is changing WordPress’s css file for the editor while the other is using a plugin. » Read more

Get the Number of All Posts in WordPress

Use the wp_count_posts() function to get the posts count. The code: <?php $count_posts = wp_count_posts(); $count_pages = wp_count_posts('page'); echo "<li><a href=" . get_option('home') . ">"; echo $count_posts->publish . " Posts, " . $count_pages->publish . " Pages"; echo "</a></li>" ?>        » Read more

Speeding Up the Site by Using PHP GZIP Compression

Compression is a simple way to speed up the site. PHP’s gzip compression is excellent. And using it is very convenient: Simply put these codes before any HTML content at the beginning of the PHP script: <?php if (substr_count($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip')) ob_start("ob_gzhandler"); else ob_start(); ?> In WordPress, the suitable position for these codes is the beginning of the header.php file of the theme. » Read more

How to Redirect WordPress Feed to Feedburner Using .htaccess

.htaccess is a powerful tool. Let’s look at how to using .htaccess to redirect WordPress feeds to feedburner. Let’s use my blog as the example. The WordPress’s feed url of my blog is http://www.fclose.com/b/feed/. Now I want to redirect it to feedburner with url http://feeds.fclose.com/fclosefeed . The idea is quite straightforward: For every request to http://www.fclose.com/blog/feed/, first check whether the HTTP_USER_AGENT is FeedBurner or FeedValidator. » Read more

WordPress Theme: ZM Theme

About ZM Theme ZM Theme is a simple and light-weight theme for WordPress. ZM Theme provides a green style, bright view and fast rendering experience to the users. ZM Theme passes W3C XHTML 1.0 and W3C CSS level 3 validation. This theme works well on WordPress 2.9.x. ZM Theme is originally designed for this blog based on Green Park 2. After changing a lot of the design and the style and making it pass XHTML 1.0 and CSS level 3 validation, I decided to publish it. » Read more

Put the Categories, Archives and All Posts into Pages

I prefer putting pages that contains all the categories, archives and even all the posts in one page to putting these links in the side bar. Actually, most of time it needn’t to stay on every pages. And if it is in the side bar, the search engine will see these links in every page and think it is very important while it is not so important. » Read more

Change WordPress’s Excerpt Length

The default excerpt length of WordPress is 55 words. Some one like me may want to change the excerpt length. I like the have a smaller excerpt length for the homepage. WordPress provides a interface for changing the default excerpt length. The method is very simple and easy. Put these codes into the function.php file in the theme directory. I prefer 35 in my blog. » Read more

Use noindex Meta Tag in WordPress to Prevent Search Engine Indexing Categories, Tags and Archives

WordPress has the content duplication problem which may confuse search engines. Duplicate content won’t hurt you, unless it is spammy or keyword stuffing, as said by Matt Cutts, and Google may just ignore the duplicate content. However, instead of letting the search engines decide which pages of the duplicate ones are important, we may only want the search engine to index the posts and pages instead of categories, tags or archives. » Read more

Use Excerpt in Index, Category, Tag and Arhieve Pages for WordPress

By default, all of the content of the post is shown in index, category, tag, archive and search pages. This is duplicate contents which may cause search engine penalty. The better way is using excerpt in index, category, tag and arhieve pages. By doing this the duplication can be avoided and the blog is optimized. After using the excerpt the blog will be much faster. » Read more

Verifying WordPress Blogs with Google Webmasters

Note: this may not be working anymore with latest WordPress and Google Webmasters. Considering this as a historical reference. Google Webmasters gives two methods for verification: Meta tag and HTML file. The meta tag method can not be used for ones that do not have the permission to upload plugins. And usually theses users such as me on ericzqma.blogs.mu do not have the permission to upload files to the root directory either. » Read more

The WordPress Desktop Client – lekhonee

I find a desktop client for publishing to WordPress blogs – lekhonee[1]. I find it interesting and easy to use. This is the first post using it. The interface is simple, but it can provides most of the functions: * Writing post. * Select categories. * Add tags. * Load and Edit the old post. And it can provides the convenient “Spell Check” function. » Read more

Moved back to WordPress from MediaWiki

WordPress is so missed for many great features and plugins. Hence, we moved the site back to the WordPress system on Jul. 12, 2013. MediaWiki is great but, for this site, WordPress is a better solution. The so missed features of WordPress ∞Related posts via the YARPP Plugin. URLs without strongly mapped to the title using ‘-‘ with small letters instead of ‘_’ with the exact characters in the title. » Read more