WooCommerce · Guide
How to Install WooCommerce on localhost (Step by Step)

Short answer
Install a local server tool such as Local or XAMPP and create a WordPress site in it. Then open the dashboard, go to Plugins, search for WooCommerce, install and activate it, and finish the setup wizard.
Key takeaways
- Local is the easiest tool for a local WooCommerce store.
- You still need internet to download the plugin, or upload the zip.
- Use offline payment methods or gateway test modes for local orders.
- Local captures emails so you can check order notifications.
- Use a migration plugin to move the finished store to live hosting.
How do you install WooCommerce on localhost?
To install WooCommerce on localhost, set up a local server tool such as Local, XAMPP or WordPress Studio, install WordPress in it, then add WooCommerce from Plugins > Add New Plugin and run the setup wizard.
A local install runs on your own computer, not on a web server. Nobody else can see it, so you can build and test a shop without paying for hosting or worrying about breaking a live store.
It is the safest place to try themes, test extensions, learn WooCommerce or prepare a store before launch.
The steps below work on Windows, macOS and Linux. The only part that changes is which local server tool you pick.
Which local server tool should you use?
Local is the easiest choice for most people, XAMPP suits those who want a classic Apache and MySQL stack, and WordPress Studio is a light option from the WordPress.com team.
| Tool | Best for | Installs WordPress for you | Notes |
|---|---|---|---|
| Local | Beginners and designers | Yes | One-click sites, email capture, easy SSL |
| XAMPP | Learning the classic stack | No, manual install | Apache, MariaDB and PHP in one package |
| MAMP | Mac users who like a control panel | No, manual install | Free and paid versions |
| WordPress Studio | Quick, lightweight sites | Yes | Built on WordPress Playground tech |
| Docker setups | Developers and teams | Depends on the setup | Most flexible, more to learn |
You can download Local from localwp.com and XAMPP from Apache Friends. Both are free.
If you are unsure, start with Local. It creates the database, sets up WordPress and gives you a login link in a few clicks.
Our wider guide on setting up a local WordPress development environment compares these tools in more depth.
How do you set up WordPress on localhost?
Create a new site in your local tool, choose a site name, PHP version and admin login, then open the WordPress dashboard from the tool once the site starts.
With Local, the steps are:
- Install and open Local.
- Click the plus button to create a new site.
- Enter a site name, such as mystore.
- Choose Preferred environment, or Custom if you want a specific PHP version.
- Set an admin username, password and email.
- Wait for Local to build the site, then click WP Admin.
Our step-by-step guide on installing WordPress using Local covers each screen with more detail.
With XAMPP, the process is manual. You start Apache and MySQL in the control panel, create a database in phpMyAdmin, copy WordPress into the htdocs folder and run the installer in your browser. Our guide on adding WordPress to XAMPP walks through it.
Pick a PHP version WooCommerce supports. The WooCommerce plugin page lists the current minimum PHP and WordPress versions.
How do you install the WooCommerce plugin?
In your local WordPress dashboard, go to Plugins > Add New Plugin, search for WooCommerce, click Install Now, then Activate.
Your local site still needs an internet connection for this step. WordPress downloads the plugin from WordPress.org, just like on a live site.
Step by step:
- Log in to your local WordPress dashboard.
- Go to Plugins > Add New Plugin.
- Search for WooCommerce.
- Click Install Now on the plugin by Automattic.
- Click Activate.
If you are offline, or your local setup blocks downloads, download the WooCommerce zip from WordPress.org on another connection. Then upload it under Plugins > Add New Plugin > Upload Plugin. Our guide on installing WooCommerce manually shows that route.
WP-CLI users can do it in one line from the site's shell:
wp plugin install woocommerce --activate
Local has an Open site shell option that drops you into a terminal with WP-CLI ready.
How do you complete the WooCommerce setup wizard?
After activation, WooCommerce opens a setup screen that asks for your store address, industry and product types; fill it in or skip parts you do not need on a test site.
The wizard covers:
- Store details, such as country, address and currency
- Business type and industry, which shape suggestions
- Product types, such as physical or downloadable
- Optional extensions that WooCommerce suggests
On a local site, skip any extensions you do not need. Each extra plugin adds load and more things to update.
Choose your real store country and currency even on a test site. Tax and shipping settings depend on them, and you want your tests to match the real shop.
When the wizard finishes, you land on the WooCommerce home screen. Go to WooCommerce > Settings to check general, product, tax and shipping options.
How do you add test products and orders locally?
Add a few products under Products > Add New Product, turn on an offline payment method such as Cash on delivery, and place test orders on the front end.
WooCommerce ships with sample data you can import. Look for the sample products CSV inside the plugin's sample-data folder, then use Products > Import. This fills your shop with dummy items in seconds.
For payments, the simplest local options are:
- Cash on delivery or Check payments, which need no outside service
- Stripe test mode or PayPal sandbox, if you want to test real gateway screens
Some gateways need webhooks, which call your site from the internet. A localhost site cannot receive them without a tunnel tool. Local includes a Live Link feature for this, and gateways often have their own CLI tools.
Our guide on testing WooCommerce payments covers test cards and sandbox accounts.
How do you test WooCommerce emails on localhost?
Local captures outgoing mail in a built-in mail tool, so you can open order emails in your browser; on XAMPP you usually need an SMTP plugin or a mail-catching tool.
Order emails are a big part of any store, so check them before launch. Look at:
- New order email to the admin
- Processing and completed order emails to the customer
- Password reset and new account emails
In Local, open the site and find the Mailpit or mail tab under Tools. Every email WordPress sends lands there instead of a real inbox.
On XAMPP or MAMP, PHP mail often fails silently. Install an SMTP plugin and point it at a test mailbox, or run a mail-catcher such as Mailpit yourself.
What problems happen with WooCommerce on localhost?
The usual problems are low PHP memory, missing PHP extensions, blocked plugin downloads, broken HTTPS and slow admin screens.
| Problem | Likely cause | Fix |
|---|---|---|
| White screen after activating | PHP memory too low | Raise memory_limit in php.ini |
| Plugin install fails | No internet or blocked download | Upload the zip manually |
| Mixed content or SSL errors | Site URL uses https without a trusted certificate | Trust Local's certificate or use http |
| Slow dashboard | Background tasks and analytics | Wait for jobs or turn off unused features |
| Pages show 404 | Permalinks not saved | Save Settings > Permalinks once |
If your site will not load at all, our guide on WordPress not working on localhost lists the common fixes.
For HTTPS problems in Local, see Local WP SSL not working.
WooCommerce also adds a Status page under WooCommerce > Status. It shows PHP version, memory limit and missing extensions. Check it whenever something odd happens.
How do you move your local store to a live site?
Use a migration plugin or your host's import tool to copy files and the database to the live server, then update URLs and switch payment gateways out of test mode.
A local site uses a local address, such as mystore.local or localhost/mystore. Moving it means replacing that address with your real domain everywhere in the database.
Migration plugins handle this for you. Export the site as a package, install WordPress on the live host, and import the package there.
Before you go live:
- Delete test orders and test customers
- Switch Stripe, PayPal or other gateways from test to live keys
- Check tax, shipping and email settings again
- Set up an SSL certificate on the live domain
- Run a real low-value order and refund it
Keep the local copy afterwards. It is a handy place to test updates before you apply them to the live store.
Is a local WooCommerce store enough for learning?
Yes, a local install has every core WooCommerce feature, so it is ideal for learning, though anything that relies on outside callbacks needs a tunnel or a staging site.
Things that work fine locally include products, variations, coupons, tax rules, shipping zones, themes, the block editor and most extensions.
Things that need extra work include payment webhooks, marketplace syncing, live shipping rates from couriers and any service that must reach your site from the internet.
For those, use a staging site on your host. The WooCommerce documentation covers every feature, and you can try each one safely on your local copy first.
Frequently asked questions
Can I run WooCommerce on localhost without internet?
Mostly yes. Once WordPress and WooCommerce are installed, the shop runs offline. You need a connection to download plugins and themes, to use payment sandboxes, and for features that call outside services such as live shipping rates or marketplace sync.
Is Local or XAMPP better for WooCommerce?
Local is easier for most people because it installs WordPress for you, captures emails and handles SSL. XAMPP is fine if you want to learn the classic Apache, MySQL and PHP stack, but every step is manual and email needs extra setup.
Can I take real payments on a localhost store?
No. A localhost site is only reachable from your own computer, so customers cannot visit it. Use test modes or offline payment methods locally, and switch gateways to live keys only after moving the store to a real hosting account.
How much memory does WooCommerce need locally?
WooCommerce works best with at least 256 MB of PHP memory. Many local tools default lower. Raise memory_limit in php.ini or set WP_MEMORY_LIMIT in wp-config.php, then restart the site and check the WooCommerce Status page.
Will my local orders move to the live site?
They will if you migrate the whole database. Delete test orders, customers and coupons before you migrate, or reset the store after the move, so your live reports and stock levels start clean.
Sources
- WooCommerce plugin WordPress.org Plugins
- Local Local by WP Engine
- XAMPP Apache Friends
- WooCommerce documentation WooCommerce
- wp plugin install WordPress Developer Resources
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.
Thanks — we review requests within 3 business days.
Related guides
About the editors
Researched from the primary sources listed above and checked against our editorial rules before publishing.


