How to add a link exchange manager into your blog

March 14, 2006 by  

Exchanging links with other websites or blogs is one of the ways for you to promote and increase your blog traffic. Getting links from other sites or blogs can also increase your PageRank. Your PageRank, combined with other onsite ranking criteria will give your pages a better chance to be ranked high in Google search results.

WordPress comes with a built in links exchange tool that allows you to links to other sites. This tool should suffice for most people link exchange needs. However if you want more you’ll have to look somewhere else.

Here at, I’ve added a Partners page that allows others to add their own links. I am using Link manager LinkMan from PHPJunkYard.

Here’s how it works: When someone fills out and submit the Add Link form, LinkMan verifies if a reciprocal link to has been added before adding the link into’s Partners page. Currently, I haven’t seen any WordPress plugin that is able to do this so LinkMan is a good alternative.

If you prefer, you can install LinkMan by itself without bothering with WordPress integration and just place a link pointing to your link page anywhere from your blog. All you have to do is edit LinkMan’s header.txt and footer.txt files to match your blog template design. But if you want a seamless integration, you’ll have to perform several extra steps. Since LinkMan is not a WordPress plugin itself, we’ll have to find a way to integrate and run it from a WordPress page.

To do this I use PHPExec from This plugin lets you execute dynamic PHP code in posts. Note that if you are using WordPress 2.0, you’ll need to use the patched version to make this works.

Now, just install the PHPExec plugin as you nomally would with a plugin. Once activated, proceed with the LinkMan installation by following the instructions as outlined in the Readme.htm file that comes with the script. After installation, your LinkMan link page normally can be accessed via

But what you want to do now is to run links.php from a page in your blog. To do so, create a page and place the following code on the page editor.


<?php include("/path/to/my/links.php"); ?>



You can also wrap the code itself from links.php with the <phpcode> tags instead of linking directly to the links.php file. Either way, you’ll need to remove the following line from links.php since you won’t be using those files anymore to create your header and footer.





You may also want to edit other HTML element in your link page to match your blog template design as close as possible.

So there you have it, a functional, and easy to use link manager on your blog!

Thanks to for the pointer.


Did you enjoy this post? Please subscribe via RSS or email.

Related posts


RSS feed | Trackback URI


Comment by Thilak
2006-04-21 22:32:42

Thanks for Posting this article, It helped me a lot. Intially i had some problems but then I did it

See this


Comment by Thilak
2006-04-23 20:24:48

How to add the Sign up form to the page ??

I tried but it too me to index.php when i filled the form

Comment by Gaman
2006-04-24 00:51:04

Hi Thilak, glad to know it helps. To ad the sign up form, just create a page and paste the HTML code.

Comment by Thilak
2006-04-30 22:06:00

Thanks for your Quick Reply !!

But It doesn’t work.

The form and other stuff loads in the Page but i get error when trying to add link.

Comment by Thilak
2006-05-05 03:45:02

Add Form worked !


Comment by menj
2006-05-07 06:20:23

My “partner’s page” doesnt work. I followed your instructions as above.

A link should be showing up, you can see it at the original Linkman page:


Comment by menj
2006-05-07 11:53:28

Ok, never mind about the above. I managed to make it work ๐Ÿ™‚


Comment by Gaman
2006-05-08 02:22:51


Glad to know it’s working ๐Ÿ™‚

Comment by Keith Derr
2006-06-21 08:06:21

I have been using Reciprocal manager for a few years now on all of my websites… never thought about using it with my blogs till now… cool idea.
I have been big into reciprocal linking, but I totaly agree it has to be theme based or it will not work.

Even better, do three way linking. Link your blog “A” to another persons blog “B”, and he in turn links to your blog “C”.

This way it looks more natural to the search engins. And does not look like a reciprocal link excahnge… final note. .stay away from Link exchange sites… Google knows who they are, and from what I can tell they are penilizing sites that use em.

Comment by Techblogy
2006-06-24 00:34:41

Haha, good way to get more link.
I gonna have i too on my blog soon.
Come to exchange with me too ๐Ÿ˜›
Thanks pal for the information.


Comment by amy
2006-07-18 21:00:05

is there a way to make the links to show in several pages (like a navigation bar), since i have a lot of links requests but don’t want it to be too long on one page?

Comment by Gaman
2006-07-18 21:35:43

I guess you’ll have to fiddle with the code in order to do that. I’ll need sometime to figure it out since I am not a PHP programmer ๐Ÿ™‚

Comment by mohdismail
2006-08-18 03:20:28

i’ve problem to run the php in my new create page…the error said that:

Warning: Unknown: failed to open stream: No such file or directory in /home/isma/public_html/wp-content/plugins/phpexec.php(64) : eval()โ€™d code on line 3

Warning: Unknown: Failed opening โ€˜/path/to/my/links.phpโ€™ for inclusion (include_path=โ€™.:/usr/lib/php:/usr/local/lib/phpโ€™) in /home/isma/public_html/wp-content/plugins/phpexec.php(64) : eval()โ€™d code on line 3

can you help me with this?

Comment by Gaman
2006-08-19 01:35:45

mohdismail: It looks like you path is incorrect /path/to/my/links.php.

Make sure to edit the correct file to reflect the correct path.

Comment by mohdismail
2006-08-20 22:00:19’s working now~

Comment by Ahmad
2006-09-12 10:39:51

which is correct?

Dudez..I have some problem here..what exactly the correct path to
view my
can you give me some example?
i’ve installed my LINKMAN to

Comment by Gaman
2006-09-12 12:56:07

Ahmad: I do not know the correct path for your server. You’ll have to check with the person who uploaded the files into your server.

If you want an example path


Comment by Ahmad
2006-09-12 13:05:33

the file was uploaded in (public_html) with the of linkman directory..

Please state it in detail:
‘var’ meam what?

Comment by Gaman
2006-09-12 13:09:23

Well, it does not matter what it means. It’s like the name of a folder in my computer and you would have different folders in your computer. I couldn’t possible know what folders are available in your computer. But this time we are talking about folders in your server.

Comment by Ahmad
2006-09-12 13:17:25

if my my file way uploaded in my public_html directory in my server with the folder name ‘linkman’..then what would be the correct php code i should use in my page editor?

Comment by Gaman
2006-09-12 13:24:01

Sorry, I don’t know. You’ll have to contact your server administrator or hosting company for this info. It should be somtehing like


but you’ll have to contact your hosting company for the full path.

Comment by TheWheeler
2006-11-03 20:17:21

Great idea! Link popularity actually boosted my SERPs. ๐Ÿ™‚

Comment by Pai
2007-01-09 15:24:13

yup, i like this tool..

i use it for link directory at
pretty simple to understand..

Comment by shamsul
2007-01-22 13:45:48

hi there…ive tried to installed the plugin and such and everything looked fine until i refresh my page,then i saw this line:

WordPress database error: [You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ”shamsul el\” at line 1]
SELECT * FROM wp_users WHERE user_login = ‘shamsul el\’

what is it anyway?
how to debug this…thanks


Comment by Gaman
2007-01-22 21:34:51

I am no MYSQL expert here.. ๐Ÿ™‚ Anyway here’s a quick guess, try removing the “\” at the end of ‘shamsul el\’

Comment by Joneh
2007-01-24 15:22:04

im newbie..dont shoot me! what is “URL with reciprocal link”.
already added link for a long time… i put it in the blogroll. Am i not qualified? Or do i need to have PR5?

Comment by Gaman
2007-01-24 23:51:55

Joneh, it’s not your fault. I noticed a bug in the link exchange manager where it removes a few links automatically for some reason.

Try adding your link again while I try to find a solution for this. Cheers.

Comment by Joneh
2007-01-25 17:24:17

great… my hosting server is down on and off. probably thats the “why”. but i do appreciate be in the partner page.. for i am a true sabahan :crying:

Comment by Joneh
2007-02-09 22:47:27

sorry to disturb u again gaman… but i think i double requested my blog in the partner page. My blog is listed at no.8 and no.9. You can remove one of them.. one only ok. ๐Ÿ˜‰
thanks. Im back at this page coz im in the process of adding this link manager thing, so balik belajarlah sini.

Comment by Gaman
2007-02-10 10:26:55

Orait no problem ๐Ÿ™‚

Comment by Joneh
2007-02-10 15:33:23

got another Q… this must be CSS coding.. the numbering sequence… no.1, 2, 3 etc… can u help me gaman? just this part im stuck now. the program works as intended. but really need some thinkering with the coding. The Form Action=” “.. really need to put the directory path in full. other than that.. all cosmetic. help me pls. jsut want the numbering thing. ๐Ÿ˜‰

Comment by Gaman
2007-02-10 17:23:59

you can use <li></li>

something like

echo "<li><a href=\"$url\" target=\"_new\" class=\"linkman\" rel="nofollow">$title</a> - $description</li>\n";

Comment by Joneh
2007-02-10 17:49:41

im sorry, in what file is that?

Comment by Gaman
2007-02-10 18:12:44

The code was not displayed correctly. I have corrected the problem. This is on the link page itself.

(Comments wont nest below this level)
Comment by toxicle
2007-03-25 08:15:18

I used php Link Directory for that … works fine with loads of features. Version 2 is free but 3 is not though.

Comment by RajaRinggit.Net
2007-05-06 23:04:49

there is error on the script, can read reciprocal link in, eventhough I have added

Our URL ( wasn’t found on your reciprocal links page (!

Please make sure you place this exact URL on your page before adding your link!

Comment by Gaman
2007-05-09 21:04:28

Looks like there’s a problem with the script. Will look into it asap.

Comment by papajoneh Subscribed to comments via email
2007-06-03 18:55:51

Gaman, is this plugin still working? it does not seem to work in my wp2.2… the phpexec I mean. The Linkman error:
Warning: include() [function.include]: URL file-access is disabled in the server configuration in /public_html/wp-content/plugins/phpexec.php(64) : eval()โ€™d code on line 2
any idea?

Comment by Gaman
2007-06-04 16:49:24

I can confirm that it works with wp2.2. You might want to check with your host why they disable “URL file access” on the server

Comment by papajoneh Subscribed to comments via email
2007-06-05 10:56:20

thanks gaman… at least I know it works. Hmm… now back to my host for some explanantion ๐Ÿ˜‰

Comment by harshit
2009-05-06 18:05:33

thanx a ton gaman….very informative..

Name (required)
E-mail (required - never shown publicly)
Subscribe to comments via email
Your Comment (smaller size | larger size)
You may use <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> in your comment.

Trackback responses to this post