Dean’s FCKEditor for WordPress plugin(V3.3)

This plugin Replaces the default WordPress editor with CKeditor 3.0.1.

CKeditor is an open source WYSIWYG text editor ,brings to the web much of the power of desktop editors like MS’s lightweight and is compatible with most internet browsers which include: IE 5.5+ (Windows), Firefox 1.0+, Mozilla 1.3+ and Netscape 7+.


  • Replace the default wordpress editor with CKEditor
  • Post comment with CKEditor to provide styled and colorful comments(Optional).
  • Build-in File manager and upload manager.
  • Build-in WordPress "read more" Button.
  • Control output format.
  • Customizable toolbar buttons
  • Integrated with WordPress media buttons:


  • Manage and insert Smileys into your post.
  • Customize editor’s skin.
  • …and more.

Download FCKEditor for wordpress


This plugin requires WordPress v.2.0 or later ( Tested on  2.8.4 too).

  1. unzip and upload the files into your wp-content/plugins/ directory.
  2. Activate the plugin on your Admin Panel->Plugin Management page.
  3. Done,enjoy it.


Many thanks to all of you, who have encouraged me to update my articles  and code, and who sent in bug reports and fixes.

Continue reading “Dean’s FCKEditor for WordPress plugin(V3.3)”

Permalinks Migration Plugin for wordpress

With this plugin, you can safely change your permalink structure without breaking the old links to your website,and even doesn’t affect your search engine rankings.


Many people want to change their permalink structure,for example, from /%year%/%monthnum%/%day%/%postname%/ to /%category%/%postname%/

But doing so will make all pages indexed by search engines become invalid,moreover, losing visitors from other sites or bookmarks that links to you.

There is a way to tell the search engines (and browsers) that the page has permenantly moved, and that the old address should be replaced by the new one . It’s called a “301 Redirect”, also known as a Permanent Redirect.When you do this, Search engines will update their indexes quickly and you won’t lose your will continue to receive traffic as though nothing had changed. This works for search engines, bookmarks, and links from other sites.

By now, you know how can you change your permalinks without losing the traffic you’re already getting. You can download this Permalink Migration Plugin to achieve this for you.

This plugin will generates a “301 Redirect” when user or spider visit your site through old permalinks,and redirect them to the new permalinks of the same post.

Do not fear to change your permalink structure now, you would never lose any visitors due to changed addresses.

Download Dean’s Permalinks Migration Plugin Version 1.0


  1. unzip and upload the file into your wp-content/plugins/ directory.
  2. Activate it on your Admin Panel->Plugin Management page.


  1. goto admin panel->options->PermalinksMigration.set the old permanlink structure of your site.
  2. goto admin panel->options->Permalinks.change the new permalink structure to what you want. (personally I recommend /%category%/%postname%/, you can read @ArunBasilLal’s tour  to learn more about how to Optimizing Permalinks for Better SEO)
  3. Done,enjoy it.


Many thanks to all of you, who have encouraged me to update my articles  and code, and who sent in bug reports and fixes.

YAAPC has upgraded to version 1.1.3 with SEO Enhanced

This version adds a feature that can automatically generate “noindex,follow” meta tag in your paged comments page to avoid duplicate content in search engine.Many thanks to Hank’s for his great comment and advice to YAAPC:

Isn’t that causeing a lot of duplicate content? Do i’ve to stop all “?p=x&cp=x#comments” pages from being indexed via .htaccess/robot.txt or is there a switch to mark them “noindex” in robots meta tag? Every click on another comments page is counted as real pageview, right?

Continue reading “YAAPC has upgraded to version 1.1.3 with SEO Enhanced”

Boost your WordPress performance on Windows IIS 6 with FastCGI and eAccelerator in 5 minutes

First,download and install the FastCgi Extension for IIS 6 from microsoft.The FastCGI protocol enables PHP applications to be hosted on the IIS web server in a high-performance and reliable way.FastCGI re-uses CGI processes for multiple requests, which provides a significant performance boost as compared to CGI.

Once FastCgi is installed,Config FastCGI extension to work with php:

  1. Open a command line window,and change the current directory  to %WINDIR%\system32\inetsrv.
  2. Run
    cscript fcgiconfig.js -add -section:"PHP" -extension:php -path:"C:\PHP\php-cgi.exe"
    to register the PHP CGI program as the one that will be processing .php extensions.
  3. Modify fcigext.ini file in %WINDIR%\system32\inetsrv as the following (assuming you installed PHP to C:\PHP folder):



Next,download and install eAccelerator.eAccelerator is a free open-source PHP accelerator, optimizer, and dynamic content cache. It increases the performance of PHP scripts by caching them in their compiled state, so that the overhead of compiling is almost completely eliminated. It also optimizes scripts to speed up their execution. eAccelerator typically reduces server load and increases the speed of your PHP code by 1-10 times.

After eAccelerator is downloaded:

  1. Copy eaccelerator.dll to your php extensions folder to c:\php\extensions.(assuming you installed PHP to C:\PHP folder)
  2. Create a folder (with the appropriate permissions) for the temporary cached files.
    For example: c:\tmp\eaccelerator
  3. Add the following to your php.ini (as the first loaded extension):

    eaccelerator.keys = "shm"
    eaccelerator.sessions = "shm"
    eaccelerator.content = "shm"

That’s all,restart your IIS and you’ll get a faster WordPress on windows IIS 6 with highly boosted performance.

Because IIS does not support mod_rewrite module for rewriting URLs,the biggest problem hosting wordpress on iis is that you always get an ‘ugly’ and not SEO-friendly index.php in your can install wp_url_rewriting,an open source URL rewriting for wordpress, to resolve this issue.

Yet another Ajax paged comments plugin for wordpress (YAAPC)

This Plugin provides Ajax enabled comments system with paging,posting and form validation to your WordPress blog.



  • Ajax page navigation

    When the user navigate through the comments via page selector,only the comments area will be send back to the client and refreshed,not the full page.This actually save your server load and bandwidth thus making your blog faster and more responsive. The paging system works even if JavaScript is disabled.

  • SEO friendly

    Pagination can cause a duplicate content issue with search engines.YAAPC can automatically generate “noindex,follow” meta tag in your paged comments page to avoid duplicate content in search engines that may hurt your rankings.(many thanks for Hank’s great comment and advice)

  • Ajax comment posting

    Posting comments via Ajax,without page refreshing.

  • Comment form validation

    validate the user input in comment form before sending to server. 

Continue reading “Yet another Ajax paged comments plugin for wordpress (YAAPC)”

The problem about Permalinks Migration Plugin

Some people told me that they can’t redirect from default permalinks structure (/?p=#) to a new one via Permalinks Migration plugin.Revenuenets sent me a message a few days ago:

hi Dean,i think the problem that i’ve asked you previously is a wordpress 2.5 limitation,without using any plugins, wordpress itself can’t even redirect /%postname%/ to /%category%/%postname%/ .
any comments on that?

Continue reading “The problem about Permalinks Migration Plugin”

WordPress 2.5 Error on Windows IIS:Undefined index: PATH_INFO

After upgrading to WordPress version 2.5 on Windows IIS,you may get the following errors:

Notice: Undefined index: PATH_INFO in (path)\wp-settings.php on line 74 
Notice: Undefined index: PATH_INFO in (path)\wp-settings.php on line 77 

to solve this problem,open file wp-settings.php,goto line 71 and replace the following code:



if (empty($_SERVER['PATH_INFO']))
	$_SERVER['REQUEST_URI'] = substr($_SERVER['SCRIPT_NAME'], 0, strrpos($_SERVER['SCRIPT_NAME'], '/')) . '/';
else if ( $_SERVER['PATH_INFO'] == $_SERVER['SCRIPT_NAME'] )

this will resolve that issue,Your can also download an already modified version of wp-setting.php from here.

Fckeditor for wordpress is now hosted on Google Code

Dean’s fckeditor for wordpress is now hosted on Google Code at,it is licensed under a GNU General Public License 2.0.

you can use this comand to check out the newest source code from the Google Code Subversion repository:

svn checkout fckeditor-for-wordpress

if you have bug reports or feature requests, you can submit an issue.

if you have any questions about this plugin, don’t hesitate to email me, since I know the documentation is lacking.

Google Code Prettify for wordpress

This small wordpress plugin enable syntax highlighting of code snippets in your post using Google Code Prettify.

Notice: you will need to have JavaScript enabled in your browser for this to work.

I had developed another Source Code syntax highlighting plugin using Geshi before,but they are totally different things.with Geshi,code is parsed on the server side,no javascript is needed.

It’s hard to say which is the better,choose one based on your own needs.

Download Google Code Prettify for wordpress v1.1


This plugin requires WordPress v.2.0 or later.

  1. unzip and upload the files to your wp-content/plugins/ directory.
  2. Activate the plugin by logging into your WordPress administration panel, going to ‘Plugins’, then clicking the  ‘Activate’  button for  ‘Google Code Prettify’.
  3. Done,enjoy it.


Put code snippets in <pre class="prettyprint">…</pre> or <code class="prettyprint">…</code> and it will automatically be pretty printed.




# Fibonacci numbers
# Writes an infinite series to stdout, one entry per line
function fib() {
  local a=1
  local b=1
  while true ; do
    echo $a
    local tmp=$a
    a=$(( $a + $b ))

# output the 10th element of the series and halt
fib | head -10 | tail -1

More examples

FAQ (from

  1. Which languages does it work for?
    The comments in prettify.js are authoritative but the lexer should work on a number of languages including C and friends, Java, Python, Bash, SQL, HTML, XML, CSS, Javascript, and Makefiles. It works passably on Ruby, PHP and Awk and a decent subset of Perl, but, because of commenting conventions, doesn’t work on Smalltalk, Lisp-like, or CAML-like languages.
  2. How do I specify which language my code is in?
    There’s no way to tell it which language because would complicate the interface. If it doesn’t guess the language properly, that’s a bug.
  3. Which browsers does it work with?
    It’s been tested with IE 6, Firefox 1.5 & 2, and Safari 2.0.4. Look at the test page to see if it works in your browser.

Source Code syntax highlighting plugin for WordPress (V1.2)


This WordPress plugin using Geshi to highlight source code in a wide range of popular aims to be a simple but powerful code highlighting plugin, with the following goals:

  • Easy to use.
  • Support for a wide range of popular languages.
  • Customizable output formats.


This plugin requires WordPress v.1.5 or later.

  1. Download Dean’s Code Highlighter v1.2  and unzip it.
  2. Upload the plugin to your plugin directory (wp-content/plugins).
  3. Activate the plugin through the ‘Plugins’ menu in WordPress.
  4. Modify the stylesheet file geshi.css to get the coloring you prefer.


Use the "pre" tag and add the programming language you want to use as a parameter. Example:. < pre lang="php" >your code here … < /pre >. for example: <pre lang="php"> function hello_world(){ echo "hello world" }</pre> after highlighting:

function hello_world()
echo "hello world";

You can see a Living demo at here.

Revision History

  • version 1.2 (2007-08-28)
  • version 1.1
    • Add the ability to strips unwanted tags in your code snippets added by WYSWYG editors.
  • version 1.0 initial version

See also

There is another plugin may interest you:Google Code Prettify for’s a javascript syntax highlighter based on Google Code Prettify.

wp_url_rewriting:URL Rewriting for WordPress under IIS (V 2.1)

This ISAPI filter removes the index.php from WordPress permalinks on Windows IIS,making your permalinks more pretty and SEO friendly.

Because IIS does not support mod_rewrite module for rewriting URLs, if you are running WordPress on Windows IIS,whenever you try to use Permalinks, you always get something like this:…../

this ISAPI filter can remove ugly "index.php" from the URL’s easy to use,just install it and no further configuration is necessary.

download wp_url_rewriting

Key benefits:

  • Speed.

    this URL Rewriting engine is writing in C++,because it’s designed dedicated for WordPress,so the program’s logic is very simple and no regular expression is’s extremely faster than other rewriting engines on the IIS platform.
  • Support Multiple WordPress sites on one server.
  • No configuration is needed

    This URL Rewriting engine will automatically detect all WordPress sites on your server,and generate URL rewriting rules for each of them.

Living Demo

You can take my site as a living demo, navigate through my sites,watch the ‘pretty’ address in the browser.


You must have administrator privileges on the target server in order to install this plugin.


1). Copy wp-url-rewriting.dll to the target machine and register it as an ISAPI filter using IIS MMC snap-in. wp-url-rewriting.dll can be registered at either the site level or the global level.Note:if WordPress is not installed in the root directory of your site,you should setup it as a virtual directory.

2). after register,Login to your WordPress admin panel->options->Permalinks,make sure you have removed the index.php from your permalink structure.

3). Do a little hack to WordPress file ‘link-template.php’ to make paging works well for categories:(NOTE: You don’t need to do this step if you are using WordPress 2.3.0 or newer)

open file /wp-includes/link-template.php and find the following code:

function get_pagenum_link($pagenum = 1) {

 global $wp_rewrite;

 $qstr = $_SERVER['REQUEST_URI'];

 $page_querystring = "paged";



Replace it with:

function get_pagenum_link($pagenum = 1) {

 global $wp_rewrite;

 $qstr = $_SERVER['PATH_INFO'];

 $page_querystring = "paged";



Revision History

  • version 2.1 -2007-8-29
    • Fixed a bug that may cause rewriting failed if there are many blogs under a single site.
  • version 2.0 -2007-8-17
    • no configuration file needed.This version automatically generate URL rewriting rules for each WordPress sites on the same server.
    • Support multiple WordPress sites on the same can install this filter at the global level to support multiple WordPress sites on your server.
  • version 1.1 – 2006-11-1
    • optimize algorithm.
    • exclude directories : wp-admin,wp-content from the url rewriting rules.
  • version 1.0 – 2006-9-2
    • Initial Version

this ISAPI filter has been build with /MT switch(multithread, static CRT) ,if you failed to load this plugin,download vcredist_x86.exe from microsoft,run it on the target computer,this installs all Visual C++ libraries as shared assemblies.

Please feel free to report any bugs.

This project is licensed under GNU General Public License 2.0.