Beginner's Guide for WordPress - Start your WordPress Blog in minutes.
Choosing the Best
WordPress Hosting
How to Easily
Install WordPress
WordPress Plugins
View all Guides

How to Open External Links in a New Window in WordPress

Last updated on by
Special WordPress Hosting offer for WPBeginner Readers
How to Open External Links in a New Window in WordPress

In WordPress every time an author wants to add a link in a post they have the option of selecting “open link in new window”. Although doing it manually is an option, there is a better way. By using this plugin you can have all external links open in new windows automatically even if someone forgets to check the box.

check box

Video Tutorial

If you don’t like the video or need more instructions, then continue reading.

All you have to do is go and download the plugin. There is no back end so you do not have to worry about setting anything up in the admin panel. Once you have activated it every link will be opened in a new window using JavaScript’s Not only is this SEO friendly but the code is also XHTML Strict compliant. The best part about this plugin is that when Javascript is disabled in someones browser it doesn’t return any errors but just remains inactive.

Download the plugin Open External Links in a New Window.

Editorial Staff at WPBeginner is a team of WordPress experts led by Syed Balkhi. Page maintained by Syed Balkhi.

WPBeginner's Video Icon
Our HD-Quality tutorial videos for WordPress Beginners will teach you how to use WordPress to create and manage your own website in about an hour. Get started now »


  1. Ben says:

    How do you open external links (eg advertising) when the person on your blog plays any of the videos?

  2. João Leitão says:
  3. Clare says:

    Can anyone tell me how to open a MENU item in a new window? I don’t see an option in the Edit Menus page. I have an external link in a footer menu , that I’d like to open in a new window.

  4. Mike Cavanaugh says:

    I downloaded the plugin but all my links still open up in my wordpress page.

    On my side bar ads, I want them to open up in a separate page and leave my page open?

    Same for all the links in the “find a professional menu” I want people to go to their links/sites but keep my site open so they will have it in front of them.

    Help please?


  5. demeyere says:

    I think it is much easier to just handle this in the jQuery for the whole site… and never worry about it again. (Substitute your own domain name for mine, of course.)

    // open all external links in a new window


    • wpbeginner says:

      @demeyere Again, the plugin above is not using target _blank to make sure that the site validates with XHTML strict. But yes, your code will do the job as well.FYI for others reading: Now anyone can simply make a plugin and call this snippet in the header. It wouldn’t make any difference in the load time between you manually putting in your header or calling it via a plugin into wp_head() hook.

  6. easyP says:


    In earlier versions of wordpress, you selected the text you wanted to link to and then hit the link icon on the dashboard.

    This opened a field in which you added the link.

    Worked fine.

    In latest wordpress versions, when I select the text and hit the link icon and paste in the link, the link appears at the top of the post – not surrounding the selected text.

    Am I doing something wrong?

    Plugin looks good but I’m trying to cut down on the number that I use.

    • wpbeginner says:

      @easyP It doesn’t work like that on our site. We are using 3.2.1. We select the text and hit the link icon, and it adds the link where it should. Are you using the Visual Editor or the HTML Editor?Also, any particular reason why you are trying to cut down on the number of plugins that you use?

      • easyP says:


        Hi boys.

        Number of plugins – trying to cut down because of page load time.

        I love my theme, but it runs like a donkey.

        I use the html editor when writing posts and I’m using wordpress 3.2.1 but when I select the text and hit the link icon – the link forgets the highlighted text and appears at the top of the post / page!

        Any thoughts?

        • wpbeginner says:

          @easyP If you try to this trick without a plugin, you will end up doing the same thing. The impact of this plugin on your load time is barely noticeable.

        • easyP says:


          Worth knowing that – thanks boys.

  7. AstroGremlin says:

    I just installed this plug-in. Kind of a funny name, Open External Links in a New Window, but certainly a great idea. Thanks!

Add a Comment

We're glad you have chosen to leave a comment. Please keep in mind that all comments are moderated according to our comment policy, and all links are nofollow. Do NOT use keywords in the name field. Let's have a personal and meaningful conversation.