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 Add a PayPal Donate Button in WordPress

Last updated on by
Special WordPress Hosting offer for WPBeginner Readers
How to Add a PayPal Donate Button in WordPress

Are you looking to add a donate button on your WordPress site? PayPal makes it super-easy to accepts donations on your website. In this article, we will show you how to add PayPal donate button in WordPress.


Many bloggers and non-profits add PayPal donate button on their WordPress sites. This allows them to cover the cost of running their blog and/or generate funds for their cause. If you wanted to add a PayPal donate button in your sidebar or donation pages, then you’re in the right place.

Note: Method 1 only works with self-hosted sites. If you want to add a PayPal donate button on your sites, then use method 2 to manually add the code. (See the difference between free vs

Video Tutorial

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

Before you start, the first thing you need to do is create a PayPal account. If you already have one, then simply login to it as you will need the information later in the article.

Method 1: Adding a PaylPal Button in WordPress using a Plugin

The easiest way to add a PayPal donate button in WordPress is to use one of the many free PayPal donation plugins.

Start by installing and activating the PayPal Donations plugin. Upon activation, you need to visit Settings » PayPal Donations to configure the plugin.

Settings page for PayPal Donations plugin

First you would need to provide your PayPal email that you used to create your account and then choose a currency.

You can also have the option to provide a custom donation page URL from your PayPal account as well as provide a return URL where users will be redirected to after they have made the donation such as a Thank You page.

You can create a WordPress page to thank the donors and then enter the page’s URL as the return page.

As for donation options, you can add a fixed amount, purpose, and reference for your PayPal donations. Lastly, you can select a PayPal button style. Once you are done, simply save your settings.

Select a button to display

Now you can display your PayPal donate button using the shortcode [paypal-donation] in any WordPress post or page.

Alternatively, you can visit Appearance » Widgets section in your WordPress admin and add PayPal Donations button to a sidebar.

PayPal Widget in a WordPress sidebar

The widget has the same settings, so all you need to do is provide a title and text for the donation widget and save your widget settings.

Free PayPal Donations Plugins for WordPress

PayPal Donations plugin are by far the easiest and simplest method to add a donate button for beginners. However, since there are plenty of PayPal plugins available, it can be confusing. We have hand-picked the best PayPal donate plugins that you can use.

If you want more than just a donate button, then check out our list of the 10 WordPress PayPal plugins for easily accepting payments. These plugins will not only help you collect donations, but you can also use them to sell digital content, services, and even physical goods.

Method 2: Manually Adding a PayPal Button in WordPress

Since does not allow you to install plugins, you have to manually add a PayPal donate button to your site.

This method also works for any WordPress user who does not want to install a plugin.

Start by logging in to your PayPal account, and click on the Tools menu item. On the next page, click on the PayPal buttons icon.

PayPal Buttons under the tools section

On the next page, you will need to click on a link to create a new common button in the right hand side.

Creating a new PayPal button

On the button creation page, you need to choose donations under the button type. After that choose the currency, amount, etc. Once you are satisfied with the settings, simply click on the ‘Create Button’.

PayPal Create a Donate Button

On the next page, you will see the code you need to display the PayPal donate button. Click on the Email Tab because this option will allow for more customization options. Paste this URL in a Notepad or another text editor.

PayPal Link for the Donate Button

Next go to your WordPress admin area and edit a post or page where you want to add the PayPal donate button. It’s important that you’re in the Text Editor mode not the visual editor mode. Then copy and paste this code:

<a href="Your Email URL that you got from PayPal" target="_blank" rel="nofollow"><img src="" alt="" /></a>

Make sure to replace “Your Email URL that you got from PayPal” with the link that you pasted in your notepad in the step above.

That’s all. You now have a PayPal donate button in your WordPress sites without a plugin.

You can also paste the code inside a WordPress text widget to add it on your sidebar.

Here’s a live example of the donate button:

Donate to WPBeginner

Feel free to click on it to see how it works. You can make a donation to help us if you found this article helpful :)

Customization Options

The reason why we chose the email link instead of the Website form code is so you can easily customize the donation image. Below are some other official PayPal donate buttons. Simply copy the code and replace the image section in your main code above.

<img src="" alt="" />

<img src="" alt="" />

<img src="" alt="" />

<img src="" alt="" />

<img src="" alt="" />

<img src="" alt="" />

If you don’t like any of these images, then you can create your own. Simply upload that image into your WordPress media library and get the File Link. Next add that link in the code below:

<a href="Your Email URL that you got from PayPal" target="_blank" rel="nofollow"><img src="The Image URL" alt="" /></a>

We hope this article helped you add a PayPal donate button in WordPress. You may also want to checkout our guide on how to add a Stripe donate button in WordPress.

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

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. Paul Mozina says:

    I got the PayPal button to work on a post, np, thanks to you. Now, how do I add the PayPal button to my main sidebar?

  2. Jen Maffett says:

    I pasted the code from Paypal into my WordPress page, post and project page and in each instance it appears when I switch back to Visual, but then when I publish the code gets stripped out and nothing appears on the actual page. When I go back to the editor the code has been erased or truncated. Is there something I can do to make it “stick”?

    I see that this happened to others in the comment string, but I didn’t see a solution mentioned.

    • WPBeginner Support says:

      Basically you just need the link from the PayPal under the Email section. This is a plain URL and the code just adds the link to a donate button image. You can download the donate button image from PayPal website and upload it in post editor. Right click on it and link it to your PayPal email URL.

  3. Patel jignesh says:

    I found this one is best suitable plugin for paypal donation

  4. Lucy Barret says:

    This post is pretty handy for me as I was about to add PayPal buttons on my clients site. Thansk…

  5. Wll says:

    Make sure to watch that you put the URL within the ” ” brackets and hit refresh button on your site, worked fine for me

  6. D. says:

    Hello, I visited paypal site today and noticed that it said to only use the donation button for a fundraising cause. It said to chose another option if you are not raising money for a cause. So are we no longer able to use donate buttons on our blogs if it is not for a cause? I was hoping to raise money to help finance my blog.

    • Editorial Staff says:

      You can definitely use the donate button as several folks are using it.

      • Dorothy Reedy says:

        I tried this (I have a mac) and it didn’t work at all; instead of a button I just have a really long bunch of text.

  7. leoo says:

    the problem is that I am not seeing PayPal Donation Button , only other buttons like , buy , add card , subrscribe etc … donation isn’t :S please help me

  8. Shara says:

    Hello. I have followed your instructions for adding the donate button to my side bar but it is not activated. When I click on the button nothing happens. Any advise would be greatly appreciated.

    Thank you so much!

  9. Sagar P says:

    So can the people who don’t use Paypal would also be able to donate right?

  10. Tech Punk says:

    Thank you for your help. It works great.

  11. Tessa Rathsack says:

    I know this is a super old post, but I just wanted to take a sec to thank you! I’ve been driving myself crazy trying to figure this simple thing out. I kept trying to copy/paste the “website” code into the widget, which obviously didn’t work. Thanks again!

  12. Ms. Kisha says:

    I added the ‘donate’ button to a page on my site but it is not displaying correctly. It is huge and extremely pixelated. Any suggestions on how to fix this? Thank you!

  13. Marcus says:

    So, I want to add a “donate” button to my blog so that I may expand later and use the money to buy vB 5 or something of the kind.
    However, PayPal only allows non-profit organizations to use their donate feature from what I have seen.
    How do I solve this?
    Thanks in advance.

  14. Rich Pickens says:

    Thanks, the button shows up and works but there is some extra code showing either side of it. I replaced the code in blue in this string:

    for the 2 URL bits but didn’t know what I am supposed to put for the “_blank’ del and “nofollow” bits…I am guessing this is the issue the extra code is “” after it…

    Thanks in advance for your help!

    • WPBeginner Support says:

      Rich Pickens, you only need to enter your email URL and don’t change any thing else.

  15. Rey says:

    Hi there.. I’m trying to use my custom Donate button and replacing the default PayPal button, for some reason it’s not displaying correctly, the border appear but I have specified border=”0″. Also the image is shrink though I used width=”value” and height=”value”. Hope you can help, thanks much.

  16. soniya says:

    i want to add paypal after login the user
    how can i add this
    plz help me
    i have text tyep member then opn a login page afetr login opn payapal process page
    how is it possible

    • WPBeginner Support says:

      You might need to create a custom page template for the page with the paypal donation button. In the custom page template you can put conditional tags to check a user’s logged in status and show them a paypal button, like this:

      if ( is_user_logged_in() ) {
          echo 'your paypal button code here';
      } else {
          echo 'Please sign in to see the Payment options';
  17. Kristin says:

    Once my Donate button on my WordPress sidebar takes me to the PayPal donation page, my email address shows up as the default email in the “Log In To PayPal” box. Is there any way to leave the email box blank instead? I would prefer that my email address not show up.

  18. Sabine says:

    So easy and straightforward with your step by step guide! Thanks.

  19. vivian says:

    For some reason i only see 3 options under {choose a button type}: cart, now, and 3.subscription? I don’t see donation btn. Are they the same thing?

    • vivian says:

      I just figured out paypal has different options for different countries. However, I have another question, How do you really use “Use my secure merchant account ID” to protect email address? Under “Merchant account IDs ” I chose this option “Use my secure merchant account ID” instead of “Use my primary email address xxxxx” for security purpose. After I Copy/paste the code and test out the donate btn, it took me to “pay with paypal page”, but i see my email displayed “huge” on the top left corner. I see some blogs have their logo display there instead of email address. How do I do that? I really don’t want junk mails. Thank you!!

  20. Beate Smock says:

    Very good and THAN the button appears and it doesn’t work.

    • Editorial Staff says:

      What doesn’t work in the button? It doesn’t open a donation link or what. Can you please elaborate a bit more, so we can help.

  21. Athman says:

    Thank you so much. This has really helped me.

  22. T.Seekins says:

    Thank you so much!

  23. Nizam Khan says:

    Wow! This is awesome and very useful info. It is easy to follow with this step by step process. Thanks a lot for sharing and tweeted :)

  24. Delany Martinez says:

    Thank you, thank you, thank you. I was tearing my hair out before I had the good sense to Google how to get the button up there. You guys rock!

  25. Valerie says:

    Hi! Thanks so much for this! Do you know how to center it in the sidebar?

  26. Dan Taylor says:

    You are the bomb. Just posted a Donate button in my wordpress sidebar, your tip worked the first time. Thanks a lot man, good looks.
    Half Green Records

  27. Jennifer says:

    I’m trying to implement a donation code on my wordpress blog. When I press save after pasting the code into the text widget, the code instantly shortens and then nothing shows up. What am I doing wrong? Please help! :)

    • Editorial Staff says:

      The text widget is not suppose to shorten anything. Are you using the sidebar text widget? This could be an issue with a plugin.

  28. Stephen says:

    The “Donate” button is only to be used by charities and non-profit corporations. If you do other wise, PayPal will freeze your account. See their rules.

    • Editorial Staff says:

      I suppose if that is true, then all the plugin developers with donate button should get their accounts banned.

  29. Madison says:

    Hi, I am having a problem with the code above. The code where you can post it on a page or post. I was trying to post my code on a page, and the image shows up,but it is not functioning. The image is the only thing that shows up the button does not work I copied the code and tried to link them together,but nothing is working. Am I doing the code right? Could I send you my code or something and maybe you or someone can fix it?

    • Editorial Staff says:

      If you are just pasting the image code, then it would just show the image. You have to combine the image code and the link code.

  30. Dave Stevens says:

    The above code works. However, I am having a problem with using the PayPal return URL under the advance section. I have created a WP page to return with a thank you message. However, the PayPal return is sending the user back to the home page of the WP site. It has replace my with a return link code for the PayPal page that indicated that the donation has been made. Any idea how to get PayPal to send to the WP page that I want to show? Thanks

  31. Marno says:

    Thanks!  Worked great.

  32. intellexity says:

    this is a great post – seriously it was frustrating me to the extent where i was about to pack in WordPress – thanks for the information!

  33. LoveNevaeh says:

    Hi, I am having trouble with this!! :( Please can someone help!!!

  34. Bet says:

    I know you are mostly geared for bloggers, and this article focuses on donations for support. But I run a WP website for my business. What would be the best way for me to put a PayPal button on my site that would let my clients pay their invoices from me? Those might be all kinds of different amounts– how can the client enter the exact amount of their bill? I don’t see any option in PayPal for the user to enter an amount except in a “donation” button, and these are definitely not donations!

  35. Paulo says:

    Thank you for this, I’d been meaning to add a donate button to my site for a while. Have it done now in less than 5 minutes. Cheers!

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.