WooCommerce shops
A WooCommerce shop is a WordPress application with the WooCommerce plugin. Add a WordPress application, then install and activate WooCommerce under WordPress › Plugins. See Plugins and themes.
The rules on this page apply by themselves once WooCommerce is active. There is nothing to switch on, except Redis.
Pages that are never cached
Section titled “Pages that are never cached”The page cache keeps finished pages, such as product and category pages, and hands them straight to the next visitor. A shop also has pages that must be fresh for every shopper. Netkeel always skips the cache for:
- addresses that start with
/cart,/checkout,/my-accountor/wc-api; - every shopper with something in their cart, on every page of the shop;
- logged-in users, the WordPress admin, the login page and the REST API;
- POST requests, such as a form being sent.
You can’t remove these rules.
If your cart or checkout has another address
Section titled “If your cart or checkout has another address”A shopper with something in their cart skips the cache whatever the address. But if you renamed or translated the cart, checkout or account pages, for example to /kasse/, add their paths so they are skipped for everyone:
- Go to WordPress › Page cache.
- Under Custom URL paths, type one path per line, starting with
/. - Click Save exclusions.
If a plugin keeps a cart or session in a cookie of its own, add the cookie’s name under Cookies on the same page. See Keep pages out of the page cache.
The cache is cleared when stock or prices change
Section titled “The cache is cleared when stock or prices change”Netkeel clears the application’s page cache when:
- the stock level or stock status of a product or a variation changes;
- the price, regular price, sale price or sale dates of a published product change.
It doesn’t matter what made the change: an order, an import, the REST API or a scheduled sale. Shoppers don’t see an old price or “in stock” on a product that just sold out.
To clear the cache yourself, open More at the top of the application’s page and choose Purge cache.
Redis object cache
Section titled “Redis object cache”The page cache can’t help with the cart, the checkout, logged-in customers or the WordPress admin. The Redis object cache speeds those up by keeping repeated database results in memory.
- Go to Settings › Redis.
- If Object cache reads Off, click the switch to turn it on.
Each application has its own Redis database, account and key prefix, so shops on the same server never see each other’s data, and flushing one cache doesn’t touch another. See Redis object cache.
Scheduled actions run every minute
Section titled “Scheduled actions run every minute”WooCommerce queues work as scheduled actions: order emails, subscription renewals, stock syncs. While WooCommerce is active, the server runs them every minute, whether or not anyone visits the shop.
- This needs Server cron to be on under WordPress › WordPress cron. WordPress’s other scheduled tasks keep their own schedule. See WordPress scheduled tasks.
- It starts within about an hour of activating WooCommerce, and stops the same way when you deactivate it.
- It doesn’t run on a staging copy.
Staging for shops
Section titled “Staging for shops”A staging copy is a full copy of the live shop: products, orders, customers, settings and payment keys. Netkeel stops it from acting as the live shop:
| On the staging copy | What happens |
|---|---|
| Scheduled actions | Not run. Renewals, follow-up emails and syncs copied from live stay in the queue. |
| Webhooks | Not delivered. |
| WordPress scheduled tasks | Off. Server cron under WordPress › WordPress cron is off on a staging copy. If you turn it on to test, scheduled actions and webhooks stay paused. |
| Blocked. Nothing the copy sends leaves the server, until you tick Allow email from staging under Staging settings or set up Email sending for the copy. | |
| Environment type | WordPress’s environment type is staging, so plugins that check it know this isn’t the live shop. |
Push to live without losing orders
Section titled “Push to live without losing orders”The live shop keeps taking orders while you work on staging. When you push staging live:
- Application files only is the default. The database is not copied unless you choose it, so orders and customers on live are not touched.
- Selected tables copies only the tables you tick. Leave out the tables that hold orders, customers and users.
- Full database replaces live’s whole database. The window warns that every order, customer, user, comment and form entry made on live since staging’s database was last copied from live will be lost, and you type the live domain to confirm.
Backups before pushes and updates
Section titled “Backups before pushes and updates”- Before a push: Netkeel backs up the live shop first. The backup is in the live application’s Backups as a Recovery point described as “Automatic backup before push”. To undo a push, restore it. See Undo a push.
- Before an update: with Safe updates on, which is the default, every core, plugin and theme update takes a restore point first, checks the shop afterwards, and rolls back by itself if the checks fail. See Updates.
- Every day: the shop is also backed up automatically. See Automatic backups.
PHP workers
Section titled “PHP workers”A PHP worker handles one uncached request at a time: a cart, a checkout, an admin screen. Cached pages don’t use one.
- Netkeel sets the number of workers from the server’s memory. There is no worker add-on to buy.
- Each application gets a share of them, so one busy application can’t take them all.
- A request that runs longer than 10 seconds is written to
logs/php-slow.log. Read it as PHP slow requests on the application’s Logs page. See Application logs.
If every worker was busy in the last hour, the panel shows a PHP workers busy alert: requests waited, and some got errors. Then:
- Open PHP slow requests to find the slow page, plugin or outside service, and fix it.
- Turn on the Redis object cache if it is off.
- Or upgrade the server: a server with more memory runs more workers.
PHP limits and private downloads
Section titled “PHP limits and private downloads”- Each shop starts with a 256 MB PHP memory limit and 128 MB uploads. Change them under Settings › PHP. See PHP settings.
- WooCommerce’s protected downloads folder,
woocommerce_uploads, can’t be opened by its address. Customers get their downloads through the shop only.