<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Wojciech Duraj (initSoft)</title>
    <description>The latest articles on DEV Community by Wojciech Duraj (initSoft) (@initsoft).</description>
    <link>https://dev.to/initsoft</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4256300%2Fa293751c-a7b5-46e7-825d-918e83fd621c.png</url>
      <title>DEV Community: Wojciech Duraj (initSoft)</title>
      <link>https://dev.to/initsoft</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/initsoft"/>
    <language>en</language>
    <item>
      <title>What a typical WooCommerce backup quietly leaves out</title>
      <dc:creator>Wojciech Duraj (initSoft)</dc:creator>
      <pubDate>Fri, 20 Nov 2026 20:07:35 +0000</pubDate>
      <link>https://dev.to/initsoft/what-a-typical-woocommerce-backup-quietly-leaves-out-a6</link>
      <guid>https://dev.to/initsoft/what-a-typical-woocommerce-backup-quietly-leaves-out-a6</guid>
      <description>&lt;p&gt;Backups are where I keep running into the same failure. The backup exists, it runs nightly, and something is still lost after an incident. Usually the tool did its job. It just copied something slightly different from what the shop owner assumed it was copying.&lt;/p&gt;

&lt;p&gt;Five things that decide this.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Your host's backup is not your backup
&lt;/h2&gt;

&lt;p&gt;Almost every host advertises a daily backup. That protects you against your own mistakes and does nothing when the failure is on the host's side, because the copy sits on the same infrastructure as the shop. If the account disappears, the backup goes with it.&lt;/p&gt;

&lt;p&gt;Then there is retention. Seven days sounds reasonable until a plugin has been corrupting prices for three weeks and the oldest copy you can reach is already poisoned.&lt;/p&gt;

&lt;p&gt;A second copy, off the server and with a different provider, is the minimum for a shop someone lives off.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Orders no longer live where they used to
&lt;/h2&gt;

&lt;p&gt;For years WooCommerce kept orders in &lt;code&gt;wp_posts&lt;/code&gt; and &lt;code&gt;wp_postmeta&lt;/code&gt;, mixed in with pages and blog posts. For several releases now the default has been HPOS: separate &lt;code&gt;wc_orders&lt;/code&gt;, &lt;code&gt;wc_order_addresses&lt;/code&gt;, &lt;code&gt;wc_order_operational_data&lt;/code&gt; and &lt;code&gt;wc_orders_meta&lt;/code&gt; tables.&lt;/p&gt;

&lt;p&gt;If you have a hand-rolled script that exports a fixed list of tables, written before HPOS landed, it is backing up a database with no orders in it and nobody has noticed. After a restore the shop comes back up, the catalogue works, and the order history is empty.&lt;/p&gt;

&lt;p&gt;Checking takes a moment:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;wp db query &lt;span class="s2"&gt;"SELECT COUNT(*) FROM wc_orders;"&lt;/span&gt;
wp db query &lt;span class="s2"&gt;"SELECT COUNT(*) FROM wp_posts WHERE post_type='shop_order';"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A large first number and a zero second one means the shop runs on HPOS and your backup has to cover those tables.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Orders arrive while you are restoring
&lt;/h2&gt;

&lt;p&gt;This is the one that hurts. The shop goes down on Saturday morning, you restore last night's copy, and everything comes back. So does the gap: every order placed between midnight and the outage is now gone, because the copy never knew about them.&lt;/p&gt;

&lt;p&gt;The customer paid, the payment provider has the transaction, and the shop has no order. You find out from the customer, usually days later.&lt;/p&gt;

&lt;p&gt;There is no elegant fix beyond one. Before restoring, export whatever the live database still holds past the backup's timestamp, then load it back once the restore is done. If the database is unreadable, the payment provider's dashboard is your only record of that window.&lt;/p&gt;

&lt;p&gt;This is why on a shop with real turnover the database backup interval is measured in hours rather than days.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. A backup nobody has restored is an assumption
&lt;/h2&gt;

&lt;p&gt;An archive that gets created and weighs roughly what it should is still not proof you can stand the shop back up from it. Dumps get truncated by timeouts. Copies miss tables with a non-default prefix. Archives look complete while &lt;code&gt;uploads&lt;/code&gt; was cut short by a time limit.&lt;/p&gt;

&lt;p&gt;Restoring onto a test environment once a quarter answers the question you cannot close any other way: how long does this actually take. You want that number before a client asks when the shop will be back.&lt;/p&gt;

&lt;h2&gt;
  
  
  5. Files grow faster than the database
&lt;/h2&gt;

&lt;p&gt;After a few years a shop database is usually a few hundred megabytes. The &lt;code&gt;uploads&lt;/code&gt; directory can be tens of gigabytes, because WordPress keeps every uploaded image in several sizes and plugins add their own on top.&lt;/p&gt;

&lt;p&gt;At that size a full nightly file copy stops making sense. Database daily or more often, files incrementally, a full image less frequently. It is also worth walking through those gigabytes once to see how many are still in use.&lt;/p&gt;

&lt;h2&gt;
  
  
  Four questions worth answering first
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Where does the copy physically live, and what happens to it when the hosting account goes away.&lt;/li&gt;
&lt;li&gt;Does it include the &lt;code&gt;wc_orders&lt;/code&gt; tables, if the shop runs HPOS.&lt;/li&gt;
&lt;li&gt;How many orders fit in the window between copies.&lt;/li&gt;
&lt;li&gt;When did somebody last restore the shop from that copy for real.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;If any of them needs guessing, that is the first thing to fix.&lt;/p&gt;




&lt;p&gt;I'm Wojciech Duraj and I run initSoft. I build &lt;a href="https://initsoft.pl/sklep-woocommerce/" rel="noopener noreferrer"&gt;WooCommerce stores&lt;/a&gt; and do &lt;a href="https://initsoft.pl/opieka-wordpress/" rel="noopener noreferrer"&gt;WordPress maintenance&lt;/a&gt; for companies with no in-house IT team. Both pages are in Polish, which is where I work, remotely across the country.&lt;/p&gt;

</description>
      <category>wordpress</category>
      <category>woocommerce</category>
      <category>php</category>
      <category>devops</category>
    </item>
  </channel>
</rss>
