I just discovered the WordPress External Links plugin and couldn’t be happier with it. The plugin only has a couple functions but the SEO benefit seems to really be amazing. The External Links plugin will add a “nofollow” tag to all of the links on your WordPress blog which tells search engines to not count the link against your page rank. An extra benefit of the plugin is the fact that it adds a small external link icon at the end of each external link so readers of your WordPress blog know that they will be leaving the site. One other function of the plugin is you can make all external links open in a new window though I chose not to enable this because I cannot stand when reading articles and when I click on a link and it opens a new window.
External Links Plugin Causing Posts With Over 100 Comments To Not Display:
After doing some testing with the External Links plugin I noticed that some of my posted articles were not displaying. After a minimal amount of troubleshooting I realized it seemed to only happen on posts that had over 100 comments. I wasn’t really sure what was causing this though because I could not locate any errors in my php-errors.log, the apache log, or any other logs. Finally I noticed that in pages that had over 100 comments if I changed the External Links setting to not modify links in the sidebars that the pages with lots of comments would display again. I figured the issue must be with the total number of links that need to be parsed for the entire site but I wasn’t sure. If this was true though if I had posts with 500 comments they would probably start to not display again.
Issue Narrowed Down & Help Provided From Denis At Semilogic:
To make a long story short I was unable to figure out what was causing this issue so I posted on the External Links plugin homepage forum. Denis responded within the hour with a solution that worked. I guess PHP sets a limit on two PCRE settings which are backtrack_limit and recursion_limit. Denis pointed out that this is noted as a WordPress bug because I guess that really large posts could see the same issue. So Denis provided the below PHP code to insert into wp-config.php located in your WordPress installations root directory.
PHP Code For wp-config.php To Fix External Links Displaying Blank Pages:
if ( @ini_get(‘pcre.backtrack_limit’) <= 750000 )
if ( @ini_get('pcre.recursion_limit') <= 250000 )
The default limit set by PHP is "pcre.backtrack_limit = 100000" and "pcre.recursion_limit = 100000". So if the problem continues after you add this to the wp-config.php file try raising the limits even higher. The max that backtrack_limit and recursion_limit can be set to is 10,000,000. Be careful setting this to high though as it can cause issues with server performance.