aLinks 2.0 Bug Fixes

      20 Comments on aLinks 2.0 Bug Fixes

I had been happily using the “aLinks” WordPress plugin by Sean Hickey for quite a while. The plugin automatically generates links for keywords that you specify. Version 1 did everything that I wanted, but it broke when I upgraded to WordPress 2.6. I found that Sean had written a completely new aLinks 2.0, so I installed it and found that it mostly worked, though with some minor problems.

Then Sean seemed to vanish from the face of the Internet. His web server went off line, making it impossible to even send him an email, and has been that way for several months.

So I had no choice but to go into the source code and fix the bugs that were bothering me. Since the code is released under the GNU General Public License (GPL) I am making the revised plugin available to anyone who is interested.

New WordPress 4.x compatible version.

New WordPress 3.x compatible version.

Old WordPress 2.x compatible version.

Bugs Fixed

  1. aLinks failed to respect word boundaries when identifying keyphrases, causing links to be inserted in the middle of words.
  2. aLinks was ignoring the “classes” setting which allows you to assign one or more CSS classes to the links.

UPDATE 09/27/2014: Added a new version supporting WordPress 4.x.

UPDATE 10/31/2012: Fixed a problem with WordPress 3.4.2 and added an option to enable/disable aLinks’s internal caching.


If you are upgrading from aLinks 1.x you must first export your keyphrases to a file, then import them back in after you have installed version 2.0. Otherwise you will lose your keyphrases.

Other Notes

To install, unzip and copy the entire alinks directory to your wp-content/plugins directory.

The documentation is included as a PDF file in the alinks/includes directory.

20 thoughts on “aLinks 2.0 Bug Fixes

  1. Mark

    Hi thanks for providing this alink upgrade! What happen to Sean? anyone know, its a web mystery.
    It would be great if you continue to upgrade this from time to time.

  2. Perry

    Hi, thanks for updating this. I updated to 2.6 and then had massive issues with not being able to log in even though the site was working to public view.

    I finally tracked it down to Alinks not working, then found your blog. However, I copied files over to plugins dir and tried to activate but get the following message:

    */wp-content/plugins/alinks/alinks.php on line 100

    any ideas?

    As it probably is for you if you went to the trouble of re-writing the code, Alinks is a key element to my site traffic,

    thanks Perry

  3. Perry

    Sorry forgot to say that message was Parse error: syntax error, unexpected ‘{‘ in (my server address)/wp-content/plugins/alinks/alinks.php on line 100


  4. Jonathan Tappan Post author

    That’s pretty mysterious. The only things that come to mind are:
    1) The file got corrupted somehow.
    2) Maybe you’re using an old version of PHP? (older than version 5)

  5. Paul

    i try to install alinks 2 on my blog. i upload files, set up permisions on directories but when i trying to activate Alinks, i get this error:

    lugin could not be activated because it triggered a fatal error.

    Warning: require_once(Alinks/Cacher/Factory.php) [function.require-once]: failed to open stream: No such file or directory in /home/domains/ on line 40

    Fatal error: require_once() [function.require]: Failed opening required ‘Alinks/Cacher/Factory.php’ (include_path=’/home/domains/’) in /home/domains/ on line 40

    I cant find Cacher/Factory.php but how i can resolve this problem?

  6. Jonathan Tappan Post author


    Your installation should include the subdirectory


    which includes a file called Factory.php.

    Make sure that you extracted and copied all the subdirectories from the .zip file.

  7. Perry

    Thanks JT, definitely using PHP 5. I also tried downloading the earlier Alinks 2 prior to your fix and got the same problem. Have installed a lot of others but Alinks is the only one I’ve had issues with.

    I will try downloading it again, but the fact the the fault replicates from your version and the original makes it seem like something else.

    I checked the PHP and although no expert I couldn’t see any obvious unclosed comments above line 100 that might have caused it stop at the next ‘}’…


  8. Jim Furr

    Hi Jonathan!

    Thank you VERY MUCH for the “fix”!

    You don’t know how many hours I’ve tried different
    updates and different permissions, etc…

    You have saved my blog! :)

    Jim Furr >

  9. Jim Furr

    Oh No!

    I got it to load into the Plugins but now I get junk on my post!


    Fat Loss Review: Revealed! Diet For Idiots
    Friday 26 December 2008 @ 4:56 am

    Warning: file_put_contents(/home/fatloss4/public_html/fatloss-blog/wp-content/plugins/alinks/temp/cache/keyphrases/all.php) [function.file-put-contents]: failed to open stream: Permission denied in /home/fatloss4/public_html/fatloss-blog/wp-content/plugins/alinks/includes/Alinks/Cacher/File.php on line 161

    Fatal error: Class ‘Alinks_Cache_Exception’ not found in /home/fatloss4/public_html/fatloss-blog/wp-content/plugins/alinks/includes/Alinks/Cacher/File.php on line 166


    Please help!

    Jim >

  10. Jonathan Tappan Post author

    Importing: Select the aLinks tab, then select the Import/Export tab. Note that you can ONLY import things previously exported from aLinks. Only the aLinks 2.0 XML format or the old .ale format are supported.

    It might be possible to write a script to convert the contents of a spreadsheet to the aLinks XML format.

  11. aries

    Hey, everybody,

    I downloaded the file to my plugins directory and everything was going fine, until I tried to add my first “default” type key phrase… the form field came up, and it let me add the info, but when I clicked “ok” nothing happens.

    Any suggestions?

  12. aries

    Wait, strike that last comment… the links render on the actual blog, but no grid appears in my admin panel listing those links.

    So now I cant unlink nor adjust my links… any suggestions?

  13. Pingback: How to automatially convert keywords to links in a blog post?

  14. DroBuddy

    I just started working with WP and a friend recommend aLinks to me. After being unable to find it anywhere else, I stumbled upon it here. If it works right and serves it’s purpose… Well, I’ll gladly help with the development. ;-)


  15. Pingback: A Few Of My Favorite WordPress Plugins | Internet Business @ Jack Keifer&#39s Internet Business Blog

Comments are closed.