← Back to articles

MySQL in Plain Language: Where Orders, Users, and Products Are Stored on Your Website

MySQL is one of the most common databases on the web. On most hosting plans it holds users (logins, email, passwords), products (names, prices, stock), and orders (cart contents, total, payment status). If you run WordPress, OpenCart, Bitrix, or a typical e-commerce site on PHP, the site's "memory" is very likely MySQL. You do not need to write SQL queries as a business owner, but knowing where and how customer data is stored means you will not lose orders when changing hosts, you will back up on time, and you will not confuse "files on disk" with "tables in the database".

  • MySQL - relational database: data lives in linked tables
  • Users - separate table: email, password hash, role, registration date
  • Products - catalog: SKU, price, description, stock quantity
  • Orders - link between customer, products, total, and delivery status
  • Where it appears - WordPress, WooCommerce, OpenCart, Bitrix, Laravel, many hosts
  • Main risk - no DB backup, one login for all projects, outdated MySQL version

What Is MySQL in Plain Language

MySQL is server software that stores data in tables. A table is like Excel: rows are records, columns are fields. The difference is that MySQL serves the site, admin panel, and JavaScript cart at the same time, prevents two managers from "overwriting" the same cell, and links tables together.

Typical site flow:

  1. A visitor clicks "Place order".
  2. PHP (or another backend) receives form data.
  3. PHP sends MySQL commands: "create order", "decrease stock", "save customer email".
  4. MySQL writes data to the server disk - in database files, not in an HTML page.
  5. The user sees "Thank you for your order" - that is already a read from MySQL.

Important: product images, PDFs, and logos live in the file system (folders on the server). MySQL stores the path to the file and metadata: price, name, SEO title. Delete the uploads folder and the database will keep "broken" image paths.

What is stored Physical location Example
Page text, price, email MySQL (tables) wp_posts, oc_product
Product photo, video Folders on disk /uploads/2026/07/photo.jpg
Site code PHP files index.php, plugins
Page cache Files or Redis speed boost, not "source of truth"

Where Users, Products, and Orders Are Stored

Users

The users table is a "card index" of customers and staff. Typical fields:

  • id - unique record number;
  • email / login - for account sign-in;
  • password_hash - not the password itself, but its hash (more secure);
  • role - customer, manager, administrator;
  • created_at - registration date.

In WordPress this is wp_users, in OpenCart oc_customer, in Bitrix custom tables with a prefix. One user - one row. If a customer placed five orders, they still appear once in users, and orders reference their id.

Products

The catalog is a separate table (or several linked ones):

  • sku - internal code;
  • name, description - name and description for the site;
  • price - price; often separate special_price for promotions;
  • quantity / stock - warehouse stock;
  • category_id - link to category "Shoes", "Electronics".

Categories, brands, filters - other tables linked via foreign keys. That is why "just fix the price in Excel" does not work on a live site: the price is in MySQL, and the site reads it through PHP on every product view.

Orders

An order is an event linking customer, products, and money:

Table What it stores
orders Order number, user_id, total, status, delivery address
order_items Which products in the order, quantity, price at purchase time
payments Payment status, Payme/Stripe/Click transaction ID
order_status_history "Created → Paid → Shipped → Delivered"

Why a separate line-items table: catalog price changes, but the order must keep the price at purchase. So order_items stores a price snapshot, not only a link to the current product card.

How MySQL Works With Your Website

The site does not open MySQL directly. The chain looks like this:

Browser → PHP/Python/Node.js → MySQL → response → HTML/JSON → user

PHP (WordPress, Bitrix, OpenCart) is the most common "translator". It:

  • checks login and password against the users table;
  • selects products for the catalog: SELECT * FROM products WHERE category_id = 5;
  • creates an order in a transaction: either everything is saved, or rollback on error.

JavaScript in the browser usually does not talk to MySQL directly - that would be a security hole. JS calls an API (PHP script), and that talks to the database. Exceptions are rare anti-patterns; normal architecture always goes through the backend.

Where MySQL Physically Lives

On shared hosting (Timeweb, Beget, Hostinger) MySQL is a separate service: you get host, database name, login, and password. Data sits on the provider's disks; you manage it via phpMyAdmin or the hosting panel.

On VPS/VDS MySQL is installed by an admin or contractor; database files are in /var/lib/mysql/ (Linux).

In the cloud (AWS RDS, DigitalOcean Managed DB) - managed service: less hassle with updates, subscription pricing.

Typical E-commerce Tables

A simplified schema you can show a director on one slide:

users ──────┬──── orders ────── order_items ────── products
            │         │
            │         └──── payments
            │
            └──── addresses (delivery addresses)

categories ─── products
brands ─────── products

users → orders: one customer, many orders.
orders → order_items → products: one order, several line items, each links to a product.
products → categories: product in one or several categories.

When someone asks "how many Nike sneakers did we sell in March" - that is an SQL query to such tables. More on query language and SQL for leadership in a separate article.

MySQL and Popular CMS Platforms

CMS / platform Default database Where orders and customers live
WordPress MySQL / MariaDB wp_users, wp_posts, WooCommerce: wp_wc_*
WooCommerce MySQL wp_posts (orders as post type), meta tables
OpenCart MySQL oc_order, oc_customer, oc_product
1C-Bitrix MySQL Custom schema, 1C integration
Laravel / PHP custom MySQL or PostgreSQL Tables from developer migrations
Django PostgreSQL more often MySQL also possible

MariaDB is a MySQL fork, compatible "out of the box". On many hosts the panel says "MySQL" but runs MariaDB - for the site there is almost no difference.

If the site is on Django or a modern Python stack, PostgreSQL is chosen more often, but the principle is the same: users, products, orders tables - just different names and field types.

How MySQL Differs From PostgreSQL and Excel

Criterion Excel MySQL PostgreSQL
Simultaneous orders from site No Yes Yes
Typical WordPress hosting - Included Less common
Complex analytics Limited Good Very good
Startup cost $0 $0 - $20/mo on hosting Similar
Who chooses Manager "on the fly" CMS, PHP shops New web projects, SaaS

For a business owner: MySQL is not "worse" than PostgreSQL - it is the standard of the PHP-CMS ecosystem. Switching MySQL to PostgreSQL "just because" on a working WordPress site is wasted money. Switching makes sense for new development or when you hit limits and need different architecture.

Keep Excel for one-off calculations. Operational orders and customers belong in MySQL (or another DB), otherwise the site and warehouse live in different worlds.

What a Business Owner Should Know

Database backup is not optional

Losing MySQL without a backup = losing all orders, customers, and passwords (hashes). WordPress theme files can be downloaded via FTP; orders cannot be restored without a .sql dump or host auto-backup.

Minimum:

  • daily auto-backup via hosting panel;
  • manual dump before CMS and plugin updates;
  • store a copy not only on the same server.

MySQL credentials

Database login and password are like a safe key. Do not put them in public GitHub, do not send them forever in a shared contractor chat. Separate DB user per project; read-only rights for an analyst if direct access is needed.

MySQL version

Outdated MySQL 5.7 (or 5.6) is a security and compatibility risk with new PHP and CMS versions. During SEO audit and site tech review, DB version is checked together with PHP version.

Migration to another host

Site migration = files + MySQL dump + config update (host, login, password, database name). "Copied only the public_html folder" - the site opens, but there are no orders. A common mistake when changing hosts "DIY".

Typical Problems and Risks

"Site is slow" - is MySQL to blame?

Sometimes yes: no indexes on a three-year order table, 50,000 SKU catalog without optimization, cheap hosting with overloaded shared MySQL. Sometimes no - heavy plugins, no cache, 5 MB images. A developer diagnoses; the owner should know the database is part of performance, not only "internet speed".

Duplicate customers and "lost" orders

Happens with manual Excel import into MySQL, two order forms (site + Telegram without sync), payment failure: money charged but PHP did not save the order. Fix - transactions, payment webhooks, CRM integration, not "another Google Sheets table".

Hack via SQL injection

If a contractor writes "raw" PHP without parameterized queries, an attacker can read or delete tables. Maturity signs - ORM, prepared statements, regular CMS updates. After a WordPress hack, first check admins in wp_users and foreign records in the database.

Data growth

100 orders per month MySQL handles on any host. 10,000 orders per day - need indexes, archiving old logs, possibly a separate DB server. Plan order archive older than 2-3 years if reporting is already in BI or ERP.

When MySQL Is "Invisible" but Still There

  • Builders (Tilda, Wix) - form data on their servers, not your MySQL.
  • SaaS CRM (amoCRM, HubSpot) - customers in CRM cloud; site linked via API.
  • Marketplaces (Wildberries, Ozon) - orders on the platform; your site may have no MySQL if it is only a brochure.

If you have your own domain, WordPress, OpenCart, Bitrix - MySQL is almost certainly there. Ask your contractor: "Where are orders stored and is there a daily database backup?"

Summary

MySQL is where users, products, and orders live on a typical PHP site. It is not a folder on disk or an "admin setting" - separate server software with tables and integrity rules. PHP reads and writes MySQL; JavaScript shows the result to the user; images live separately in files.

A business owner should:

  • know that database backup matters as much as site file backup;
  • not keep the only copy of orders in Excel;
  • when changing hosts, require MySQL dump migration, not FTP only;
  • understand the difference between "site is down" (PHP/hosting) and "data is gone" (MySQL without backup).

Good MySQL is invisible - while there is a current backup and credentials under control. Bad MySQL is when you remember it after three years of orders disappear.

Frequently Asked Questions

Where is MySQL data physically stored on my hosting?

On the hosting provider's servers - in special database files, usually on the same machines as the site (shared) or on a dedicated DB server (VPS/cloud). You do not see them as normal FTP folders: access via phpMyAdmin, hosting panel, or export command. Backup is a downloaded .sql file or automatic copy in the panel; without it, "where it lives" will not help when a disk fails.

Can I view orders in MySQL without a developer?

Partially yes. In phpMyAdmin you can open the orders table and see rows - number, total, date. But table names (wp_wc_orders, oc_order) and links between them are known to the developer; accidental edits can break the site or show wrong totals. For daily work use CMS admin or CRM; direct MySQL access is for support, migrations, and audit.

How does MySQL differ from MariaDB?

MariaDB is a MySQL fork created after Oracle took over. For WordPress, OpenCart, and Bitrix they are interchangeable in typical setup. Hosting often says "MySQL" in the plan but installs MariaDB - that is normal. For the owner what matters is version (not below 8.0 / 10.6+) and backups, not the logo name.

Will I lose orders if I change hosting?

No, if you migrate the database dump. Steps: export MySQL from old host → import on new → update login/password/host in wp-config.php or equivalent → test order. Yes, you will lose them if you copy only site files without .sql. Before migration make a full backup and check order count in admin before and after.

Do I need MySQL if I only have a Tilda landing page?

No for Tilda itself - leads stay with the builder or go to email/CRM. Yes if you also have a WordPress blog, OpenCart, or custom account on a subdomain. Clarify architecture: one "pretty landing" without CMS may skip MySQL; e-commerce with order history cannot work without a database.

Contacts