Plugin: WCS Custom Permalinks Hotfix
by Luke America on May 5, 2011
This plugin is a hotfix for permalink issues encountered with WordPress installations after upgrading to 3.1.x. It fixes the 404 error (or blank page) for menu/dropdown categories and tags. It fixes pagination for search results, categories, and tags. And, it fixes RSS feeds for categories and tags.
Further, because this hotfix is coded to work with internal URI structures, it should continue to resolve these issues in perpetuity … if needed. Also, it is worth noting that this “permalinks bug” is fairly common with both LAMP and IIS servers … after upgrading to WordPress 3.1+. Nonetheless, it is our hope that the alternatives listed below will repair the issue so that you don't need our plug-in.
You can download this plug-in at the WordPress repository. You may want to view the full source code explanation for the prototype of this plug-in (along with numerous user comments). Additionally, you may find this plugin-specific FAQ helpful.
If you find this plug-in useful or the tips below helpful, a small donation will support our continued WordPress development efforts. Enter any amount.
Leave questions, comments, and suggestions below. Thanks.
ALSO … Seán Byrne at SSD Freaks has done some painstaking research about this permalinks issue. His problem was caused by the Multi-page Toolkit plug-in after upgrading to WordPress 3.1. Moreover, his detailed article, Culprit Found, may well provide information useful to others.
Additional Usage Information
Depending on your specific Web browser settings, you may need to:
- clear your browser's cache (Cache Clearing Tips for All Browsers)
- visit your home page
- refresh your browser (F5)
- and, then test your menus/dropdowns with categories and tags
IF you are ALSO using a BLOG CACHE plug-in, you should:
- activate this plug-in
- clear your entire blog cache (with that plug-in's admin panel)
- clear your browser's cache (Cache Clearing Tips for All Browsers)
- visit your home page
- refresh your browser twice (F5)
- and, then test your menus/dropdowns with categories and tags
Eventually, plug-in authors and WordPress will update their code. When you no longer need it, simply de-activate and/or remove this hotfix plug-in.
Theme Related Issue
Permalinks Update Issue
Try this. Switch back and forth between the default permalink structure and a custom one … saving each time. Do this two or three times. Now, refresh your browser (F5) on your home page and see if your permalinks are working correctly.
flush_rules() Issue
$wp_rewrite->flush_rules();
Also, even if you're running a single-site installation, you can have “always on” plug-ins in the “mu-plugins” folder. See if that folder exists under “wp-content”. If so, temporarily rename the “must use plugin” folder.
Concentric/XO Communications Specific Issue
- open this plug-in's wcs-custom-permalinks-hotfix.php file
- scroll down to line #153 (// if everything works but your home page times out)
- follow the simple instruction to COMMENT line #151 and then UNcomment line #158
- save and close the file
- visit your home page
- refresh your browser twice (F5)
- all fixes including the home page should be working now
Media Temple Specific Issue
.htaccess File
When saved manually, the .htaccess file should utilize unix-style line-feeds (\r) and not DOS-style line-feeds (\r\n). Also, servers with FontPage extensions, use a proprietary .htaccess file and should not be modified directly.
Also, note that direct manipulation of the .htaccess file should only be attempted by an experienced network administrator. Ergo, implement the following modifications with this caveat in mind.
ALWAYS … backup your .htaccess file BEFORE making ANY changes!
.htaccess File Creation:
- this file is created/modified when you change your permalinks settings
(Dashboard -> Settings -> Permalinks) - by default, the access permission on this file is set to 644
- your server may not be able modify it as needed when you set custom permalinks
- temporarily CHMOD .htaccess to 777
- now switch back and forth between a default permalink structure and a custom permalink structure a couple of times … saving the change each time
- now, CHOMD .htaccess back to 644
- open .htaccess to verify that it contains a segment similar to one of the following
single-site baseline example to reconstruct .htaccess, if needed:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress Single-Site
multi-site baseline example to reconstruct .htaccess, if needed:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
#uploaded files
RewriteRule ^(.*/)?files/$ index.php [L]
RewriteCond %{REQUEST_URI} !.*wp-content/plugins.*
RewriteRule ^(.*/)?files/(.*) wp-includes/ms-files.php?file=$2 [L]
# add a trailing slash to /wp-admin
RewriteCond %{REQUEST_URI} ^.*/wp-admin$
RewriteRule ^(.+)$ $1/ [R=301,L]
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule . - [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-.*) $2 [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
RewriteRule . index.php [L]
</IfModule>
# END WordPress Multi-Site
Comments
Share Your Thoughts 44 Responses to “Plugin: WCS Custom Permalinks Hotfix”Trackbacks
Check out what others are saying about this post...-
[...] WCS Custom Permalinks Hotfix [...]
-
[...] WCS Custom Permalinks Hotfix is a hotfix for permalink issues encountered with WordPress installations after upgrading to 3.1.x. [...]
-
[...] WCS Custom Permalinks Hotfix is a hotfix for permalink issues encountered with WordPress installations after upgrading to 3.1.x. [...]
-
[...] WCS Custom Permalinks Hotfix is a hotfix for permalink issues encountered with WordPress installations after upgrading to 3.1.x. [...]
-
[...] WCS Custom Permalinks Hotfix is a hotfix for permalink issues encountered with WordPress installations after upgrading to 3.1.x. [...]
-
[...] 不停 Google search 下發現原真係 WordPress 既問題,而且仲有人已經出左個 Plugin 形式既 hotfix ! [...]
Subscribe to our RSS feed
Follow Us on Twitter



Hello Luke,I have some problem in missing page in category, so I implemented your hotfix plugin in my worpress version 3.1.2..It works, but unfortunately the permalink on category has change to the default settin. However in other single and page post it uses my custom permalink which are right. Just in the category url that I am have this problem.Thanks
Hi, i’m dutch sorry for my englisch.The catagory and tag problem is fixt , but the post now give a 404 Custom Structure: /%postname%/ = 404 on postif turn it back to Default (
/?p=123)is works. So a new problem. and i need the /%postname%/ for my SEOThe sub-catagories have a problem to. the URL for a sub-catagory is:http://www.site.com/catagory/sub-catagory/catagory/sub-catagory/ /catagory/sub-catagory/ + /catagory/sub-catagory/ Any ideas?thanks for your plugin but it doesnt work for meim using lighttpd and custom permalinks /%postname%/.. the problem i have is with search results..when i want to go to page2 of search results it goes to page 2 of main posts…ive tried deactivated plugin clearing cache but nothing…any other ideas? it only works with default permalinks
We installed your plugin after the issue with the tag/category permalinks. It works fine EXCEPT for the following:oursite.com/wp-login.php gives up a 404. It is your plugin causing this issue because when it is deactivated this link works fine. Is there a work around. Permalinks in our htaccess is:# BEGIN WordPress<IfModule mod_rewrite.c>RewriteEngine OnRewriteBase /RewriteRule ^index\.php$ – [L]RewriteCond %{REQUEST_FILENAME} !-fRewriteCond %{REQUEST_FILENAME} !-dRewriteRule . /index.php [L]</IfModule># END WordPressThx for any help – urgent!?
I have the 404-issue and tried your plugin, and other solutions I found on the web, but nothing works. In the phperror.log I get this info:[23-Jun-2012 09:55:14] PHP Warning: include(/home/d6649/public_html/wp-content/themes/Rojteatern/searhform.php): failed to open stream: No such file or directory in /home/d6649/public_html/wp-content/themes/Rojteatern/404.php on line 11[23-Jun-2012 09:55:14] PHP Warning: include(/home/d6649/public_html/wp-content/themes/Rojteatern/searhform.php): failed to open stream: No such file or directory in /home/d6649/public_html/wp-content/themes/Rojteatern/404.php on line 11[23-Jun-2012 09:55:14] PHP Warning: include(): Failed opening ‘/home/d6649/public_html/wp-content/themes/Rojteatern/searhform.php’ for inclusion (include_path=’.:/usr/local/lib/php’) in /home/d6649/public_html/wp-content/themes/Rojteatern/404.php on line 11