Plugins Plugin hub Backup SEO Caching Security Forms WooCommerce Images Best backup plugins
Hosting Hosting directory Shared hosting Managed WordPress Cloud hosting VPS hosting By reader location Hosting finder
Themes & builders Compare Rank Math vs Yoast
Tools All tools Hosting finder Plugin stack builder Cost calculator Salt generator Theme detector Who is hosting this? Speed test Headline analyzer robots.txt generator Redirect generator Uptime calculator Blog name generator
Blog Best backup plugins Deals
Guides All guides Speed up WordPress Choose hosting Back up WordPress
How we test

Setup & site building · Guide

How to Add PayPal to Your WordPress Website (Step by Step)

How to Add PayPal to Your WordPress Website (Step by Step)

Short answer

To add PayPal to WordPress, create a payment button in your PayPal Business account and paste its code into a Custom HTML block, or install a PayPal button or form plugin. For a full store, use WooCommerce with the official PayPal plugin, and test with PayPal's sandbox first.

Key takeaways

  • You need a free PayPal Business account and a site running on HTTPS.
  • Button code in a Custom HTML block is the quickest free method.
  • Plugins help when you manage several buttons or need custom fields.
  • WooCommerce PayPal Payments is the official option for stores.
  • Test with PayPal's sandbox or a small refunded payment before launch.

How do you add PayPal to a WordPress website?

You add PayPal to WordPress by pasting a PayPal button code into a Custom HTML block, installing a PayPal button or form plugin, or using the official PayPal plugin for WooCommerce if you run a store.

The best method depends on what you sell. A single product or donation needs only a button. A full shop needs WooCommerce.

All methods need a PayPal Business account. It is free to open, and PayPal charges a fee on each payment you receive.

This guide covers each method step by step, then shows how to test payments before going live.

What do you need before adding PayPal?

You need a PayPal Business account, a WordPress site running over HTTPS, admin access to the site, and a clear idea of whether you are selling one item, many products, or taking donations.

Check this list before you start:

  • A PayPal Business account, verified with your bank details.
  • An SSL certificate so your site loads on https.
  • Administrator access to WordPress.
  • Your prices, product names and any shipping or tax rules.
  • A thank-you page for buyers to land on after paying.

If your site does not yet have SSL, follow how to install an SSL certificate on WordPress first. Payment pages without HTTPS scare buyers away.

Many hosts include a free certificate from Let's Encrypt, a non-profit certificate authority. Check your hosting panel before paying for one.

PayPal's fees vary by country and payment type. Check PayPal's merchant fees page for your region.

Which PayPal method should you choose?

Choose a button for one-off items or donations, a form plugin when you need custom fields, and WooCommerce when you sell several products with a cart.

MethodBest forCartCostSetup effort
PayPal button codeOne product, service or donationNoFreeLow
PayPal button pluginSeveral simple buttonsSometimesFree or paidLow
Form plugin with PayPalOrders with custom fieldsNoOften paid add-onMedium
Donation pluginCharities and causesNoFree coreMedium
WooCommerce + PayPal pluginFull online storeYesFree coreHigher

Our explainer on what a payment gateway is helps if you are comparing PayPal with other options.

Method 1: How do you add a PayPal button with HTML code?

Create a payment button or link in your PayPal Business account, copy the code PayPal gives you, and paste it into a Custom HTML block on your WordPress page.

Step by step:

  1. Log in to your PayPal Business account.
  2. Open the tools area for payment links and buttons. PayPal changes the menu name from time to time, so search for buttons in your account if you cannot find it.
  3. Choose the button type, such as Buy Now or Donate.
  4. Enter the item name, price and currency.
  5. Copy the generated code or link.
  6. In WordPress, edit the page and add a Custom HTML block.
  7. Paste the code and click Preview.
  8. Publish the page.

If PayPal gives you a payment link rather than code, add a normal Buttons block and paste the link as the button URL. Our guide on how to create a button in WordPress shows how.

The Custom HTML block documentation explains how the block handles code.

This method is free and needs no plugin. The downside is that you edit prices in PayPal, not in WordPress.

Hosted buttons stored in your PayPal account are safer than hand-written ones. Their price is saved on PayPal's side, so nobody can change it by editing the page code.

Method 2: How do you add PayPal with a plugin?

Install a PayPal button plugin from the plugin directory, connect it to your PayPal account, then add buttons to pages with a block or shortcode.

Plugins make it easier to manage several buttons from your dashboard. Many also add order lists and email receipts.

General steps:

  1. Go to Plugins, then Add New.
  2. Search for PayPal button.
  3. Check the last updated date, active installs and reviews.
  4. Install and activate your choice.
  5. Connect your PayPal account in the plugin settings.
  6. Create a button with name, price and currency.
  7. Add it to a page with the plugin's block or shortcode.

You can browse options in the PayPal plugin search on WordPress.org. Pick one that is actively maintained.

Avoid plugins that ask for your PayPal password. Proper plugins connect through PayPal's sign-in or API keys.

How do you keep PayPal payments secure on WordPress?

Keep WordPress, your theme and payment plugins updated, use strong admin passwords with two-factor sign-in, and never store PayPal API keys anywhere public.

Payment details are entered on PayPal's side, so card numbers do not pass through your server. That lowers your risk a lot.

Your WordPress admin is still a target. Anyone with admin access could swap your PayPal email for their own on a button.

Check your buttons and plugin settings now and then. Make sure the receiving PayPal account is still yours.

Method 3: How do you take PayPal payments through a form?

Use a form plugin that supports PayPal, build a form with your product and price fields, then turn on PayPal as the payment method so buyers pay when they submit.

This suits bookings, registrations and custom orders, where you need details like dates, sizes or notes.

Popular form plugins such as WPForms, Gravity Forms and Formidable Forms offer PayPal through add-ons. These are usually in paid plans, so check each vendor's pricing page.

Our guide on how to create a payment form in WordPress covers the form-building side in detail.

Method 4: How do you accept PayPal donations?

Use PayPal's Donate button for a simple setup, or a donation plugin such as GiveWP when you want donor records, recurring gifts and campaign goals.

The free GiveWP plugin handles donation forms. Some payment options and recurring donations need paid add-ons.

For a single donate link, the button method above is quicker. You can switch to a plugin later.

Method 5: How do you add PayPal to WooCommerce?

Install the official WooCommerce PayPal Payments plugin, connect your PayPal account during setup, and turn on the payment methods you want at checkout.

The plugin is listed as WooCommerce PayPal Payments on WordPress.org.

Basic steps:

  1. Install and activate WooCommerce if you have not already.
  2. Install WooCommerce PayPal Payments.
  3. Go to WooCommerce, then Settings, then Payments.
  4. Open the PayPal settings and click the connect option.
  5. Sign in to PayPal and approve the connection.
  6. Choose which buttons and payment methods to show.
  7. Save and run a test order.

We cover every setting in how to set up PayPal in WooCommerce.

If checkout has problems after setup, see WooCommerce PayPal checkout issues.

How do you test PayPal payments before going live?

Use PayPal's sandbox, a test environment with fake accounts, so you can place orders and check emails and redirects without moving real money.

Many plugins have a sandbox or test mode switch. Turn it on, add your sandbox credentials, and place a few test orders.

PayPal's sandbox documentation explains how to create test buyer and seller accounts.

If you use the simple button method, the easiest test is a real low-price payment that you refund afterwards.

Check that:

  • The buyer lands on your thank-you page.
  • You receive the order email.
  • The payment shows in your PayPal account.
  • Taxes and shipping are correct.

Why is the PayPal button not showing or working?

Buttons usually fail because the code was pasted into a normal paragraph instead of a Custom HTML block, a caching or script optimization plugin blocks PayPal's script, or the site has mixed content.

Try these fixes:

  • Paste the code into a Custom HTML block, not a Paragraph block.
  • Exclude PayPal scripts from JavaScript delay or minify options.
  • Clear your cache and test in a private window.
  • Fix any http links on the page.

Our guide on fixing mixed content warnings helps if your padlock shows a warning.

Is PayPal the right payment option for your site?

PayPal is a good choice when your buyers already trust it and you want a quick setup, but it is worth comparing fees and checkout experience with Stripe and other gateways.

Many sites offer both PayPal and card payments. Giving buyers a choice can lift completed orders.

For a side-by-side look at costs, see WooCommerce payment gateway fees compared.

Fees, supported countries and features change. Always check PayPal's current terms before you launch.

Frequently asked questions

Do I need a plugin to add PayPal to WordPress?

No. You can create a button in your PayPal Business account and paste the code into a Custom HTML block. Plugins are helpful when you manage many buttons, need custom fields or run a full store.

Can I use a personal PayPal account on my website?

PayPal expects businesses and sellers to use a Business account for receiving payments on a website. Business accounts are free to open and give you the tools for buttons and integrations.

Does adding PayPal to WordPress cost money?

Adding the button is free, and many plugins have free versions. PayPal charges a fee on each payment you receive, and some form or donation plugins charge for their PayPal add-ons.

Can I add PayPal to a WordPress.com site?

Yes, but options depend on your plan. Some plans include payment blocks, and plans that allow plugins can use the same plugins as self-hosted WordPress. Check your plan's features first.

How do I test PayPal without spending money?

Use PayPal's sandbox, which gives you fake buyer and seller accounts. Turn on test or sandbox mode in your plugin, add sandbox credentials and place test orders.

Sources

  1. WooCommerce PayPal Payments WordPress.org Plugin Directory
  2. Sandbox testing guide PayPal Developer
  3. Merchant fees PayPal
  4. Custom HTML block WordPress.org Documentation
  5. GiveWP donation plugin WordPress.org Plugin Directory

Is your product missing, or something out of date?

Tell us what to add or correct. We read every note and reply when we need a source. A message does not buy a ranking.

About the editors

Written and checked byWPLegible Editorial Team Independent WordPress reviews and guides

Researched from the primary sources listed above and checked against our editorial rules before publishing.