Encodera

Thanks for reading!

Donate to the site — we work hard for you.

Contents

Installation and first setup

WooCommerce is installed like any WordPress plugin. Once activated, it creates its own tables and pages and starts the setup wizard — a few screens with questions about the shop.

Installation

In the admin panel: Plugins → Add Plugin, search for WooCommerce, press Install Now, then Activate. The same from the console, in the site folder:

wp plugin install woocommerce --activate

The command downloads the plugin into wp-content/plugins/woocommerce and activates it. The WooCommerce, Products and Marketing items appear in the admin side menu.

The setup wizard

The wizard opens by itself after activation. It asks for the shop's country and address, what you sell, and offers extra plugins — you can decline them. Everything the wizard sets can be changed later in WooCommerce → Settings:

TabWhat is there
GeneralShop address, selling countries, currency
ProductsMeasurement units, reviews, stock management
ShippingShipping zones and methods
PaymentsPayment methods
AccountsCustomer registration, guest checkout
EmailsShop emails
AdvancedShop pages, REST API, features

For a practice shop set the currency to Euro and enable Cash on delivery on the Payments tab — with it an order can be placed without real money.

Shop pages

During installation the plugin creates four ordinary WordPress pages:

PageDefault addressWhat is there
Shop/shop/The product catalog
Cart/cart/The cart contents
Checkout/checkout/Address, shipping, payment
My account/my-account/The customer's orders and addresses

Which page plays which role is set in WooCommerce → Settings → Advanced. If a page was deleted by accident, create it again and select it there.

The first product

Open Products → Add New, enter the name Mug, the price 9.90 in the Product data box and press Publish. Or create the product with a command:

wp wc product create --name="Mug" --regular_price=9.90 --user=1

The --user=1 parameter is the ID of the administrator on whose behalf the command runs. The product appears on the /shop/ page.

Checking

Open /shop/, put the mug into the cart and place an order with cash on delivery. The order appears in WooCommerce → Orders. If the whole path works, the shop is running.

Common mistake

The Shop page opens, but a product page returns a 404 error. The cause is WordPress permalinks set to Plain or address rules that were not refreshed. Open Settings → Permalinks, choose Post name and press Save Changes.

Thanks for reading!

Donate to the site — we work hard for you.