You can add a shopping cart to almost any website, whether it’s a WordPress blog, a custom-built site, or a simple one-page portfolio. The approach depends on how many products you sell and how much control you want. Options range from embedding a lightweight “buy button” that requires only a line of HTML to installing a full e-commerce platform that handles inventory, shipping, and taxes.
Choose Your Approach First
Before picking a tool, figure out what you actually need. Selling three handmade items from a personal site is a fundamentally different problem than launching a 500-product store. Your choice comes down to three main paths:
- Buy buttons or embeddable widgets: Best if you already have a website you like and just want to sell a handful of products without rebuilding anything. These drop into your existing pages with a small snippet of HTML.
- E-commerce plugins: Best if your site runs on a content management system like WordPress. A plugin like WooCommerce turns your existing site into a full online store.
- Hosted e-commerce platforms: Best if you want an all-in-one solution where the platform handles hosting, security, and payment processing. Shopify is the most well-known example.
Adding a Buy Button to an Existing Site
If you don’t want to overhaul your website, a buy button is the fastest path. Services like BigCommerce, Shopify, and Square let you create a small, embeddable checkout element you paste into any page where you can edit HTML. The button handles the product display, cart, and payment processing on its own.
BigCommerce’s buy button, for example, costs nothing upfront and carries no monthly fee. It requires no JavaScript, which means it works on virtually any website, including basic HTML pages, WordPress blogs, and even email templates. You customize the colors, fonts, and button text to match your site’s look. When a visitor clicks, they’re taken straight to a checkout flow powered by your BigCommerce account in the background. You can also connect Google Analytics to track which buttons drive the most sales.
This approach is ideal if you sell a small catalog, want to add purchasing to a blog post or landing page, or need checkout links for social media and marketing emails. The tradeoff is that you won’t get built-in inventory management, shipping calculators, or the browsing experience of a full store. For that, you need a plugin or platform.
Installing an E-Commerce Plugin
If your site runs on WordPress, WooCommerce is the most popular way to add a shopping cart. The core plugin is free. You install it directly from the WordPress plugin directory, and it adds product pages, a cart, a checkout flow, and basic order management to your existing site.
WooCommerce’s real costs come from add-ons. Most extensions, covering things like subscription billing, advanced shipping rules, or additional payment gateways, cost in the tens of dollars rather than hundreds. Some charge a one-time fee while others require annual renewal for continued support and updates. You’ll also need reliable hosting, since WooCommerce runs on your own server rather than a managed platform. Budget for a hosting plan that can handle the traffic and database demands of an online store, which typically means upgrading from the cheapest shared hosting tier.
The setup process involves choosing a payment gateway (Stripe and PayPal are the most common), configuring your shipping zones and tax rules, and building out your product listings. WooCommerce gives you deep control over every detail, but that flexibility means more configuration work on your end compared to a hosted platform.
Using a Hosted E-Commerce Platform
Platforms like Shopify handle hosting, security updates, and payment processing so you can focus on products and marketing. Shopify’s plans start at $29 per month for its Basic tier, $79 per month for its standard plan, and $299 per month for the Advanced plan, which adds features like custom reporting and lower transaction fees.
If you already have a website you want to keep, Shopify offers a “Buy Button” channel that works similarly to the embeddable approach described above. You create products in Shopify’s dashboard and embed them on your external site. If you’d rather consolidate everything, you can build your entire storefront on Shopify and point your domain to it.
Other hosted options include Ecwid, which offers a free tier supporting up to five products. That makes it a useful starting point if you want to test online selling before committing to a paid plan. You embed Ecwid’s store widget on your existing site, and it handles the cart and checkout.
Connecting a Payment Gateway
Every shopping cart needs a payment gateway, the service that securely processes credit card transactions between your customer’s bank and yours. Stripe, PayPal, and Square are the most widely used options for small businesses. Here’s what the setup process looks like:
- Create your gateway account. You’ll need to verify your business by submitting your legal entity name, tax ID, and bank account details.
- Choose your integration method. Hosted platforms like Shopify handle this automatically. If you’re using WooCommerce or a custom site, you’ll install a plugin or paste API keys into your cart’s settings.
- Build the checkout experience. This is the page your customers see when they enter their card details. Most platforms provide pre-built checkout templates. If you’re building something custom, the gateway provider supplies frontend code you integrate into your site.
- Set up webhooks. These are automated notifications that tell your site when a payment succeeds, fails, or gets refunded. Your cart software uses them to update order statuses in real time.
- Test before going live. Every major gateway offers a sandbox or test mode where you can simulate transactions with fake card numbers. Run through the entire purchase flow, including successful payments, declined cards, and refunds, before accepting real orders.
If you use a hosted platform like Shopify, most of this is handled for you. You’ll select your gateway in the settings panel, enter your credentials, and the platform takes care of the technical wiring.
Handling Payment Security
Any business that accepts credit card payments online must comply with the Payment Card Industry Data Security Standards, commonly called PCI DSS. This isn’t a federal law, but your payment processor requires it. The most recent version took effect on March 31, 2025.
Most small online stores fall into Level 4, which covers businesses processing fewer than 20,000 e-commerce transactions per year. At this level, compliance is relatively straightforward. The core rules boil down to a few practical requirements: use strong, regularly updated passwords, protect your network with a firewall, keep your site’s software patched and current, and never store customers’ full credit card numbers, expiration dates, or CVV codes on your server or hard drive.
The easiest way to stay compliant is to let your payment gateway handle card data entirely. Modern processors use tokenization, which replaces the actual card number with a random token during checkout, so sensitive data never touches your server. If you use Stripe, PayPal, or a similar gateway with a hosted checkout page, the card details are collected on their servers, not yours. This dramatically simplifies your compliance obligations because you never see or store the raw card information.
What It Costs Overall
Your total cost depends on which path you choose. Here’s a realistic breakdown:
- Buy button only: Free to set up on platforms like BigCommerce. You’ll pay transaction fees on each sale, typically a percentage plus a small flat fee per transaction charged by your payment processor.
- WooCommerce on WordPress: The plugin is free. Expect to spend on hosting (varies by provider and traffic), a domain name, an SSL certificate (many hosts include one), and any premium extensions you need. Total ongoing costs can stay under $30 per month for a simple store.
- Shopify: Starts at $29 per month plus payment processing fees. Higher tiers reduce your per-transaction rate but cost more monthly.
- Ecwid: Free for up to five products. Paid plans unlock more products and features.
Beyond platform fees, factor in the cost of an SSL certificate if your site doesn’t already have one (required for any page collecting payment information), a professional theme if you want polished product pages, and any apps or plugins for features like abandoned cart recovery emails or real-time shipping quotes.
Picking the Right Fit
If you have a WordPress site and want full control, WooCommerce gives you the most flexibility at the lowest starting cost. If you want to be up and running in an afternoon with minimal technical work, Shopify or a similar hosted platform is the faster route. And if you just need to sell a few items from an existing page without changing anything else about your site, a buy button gets the job done with zero monthly fees and a single line of HTML.
Whichever option you choose, make sure your checkout pages load over HTTPS, your payment gateway handles card data so you don’t have to, and you test the full purchase flow on both desktop and mobile before telling customers your store is open.

