Technologies · MySQL

MySQL development for stores and PHP apps under real load

When a WooCommerce checkout slows down or an admin page times out, the cause is usually in the database. We find the queries responsible and fix them at the schema, index or configuration level.

Definition

What is MySQL?

MySQL development services cover designing, optimizing and operating databases on MySQL, the open-source relational database used by WordPress, WooCommerce and most PHP applications. MySQL stores data in InnoDB tables with transactions and row-level locking, and scales reads through replication to secondary servers. MariaDB, a community fork, is often used in its place, but the two have drifted apart and are no longer interchangeable in every case.

Fit

Where MySQL is the right database

01

WordPress and WooCommerce

WordPress supports only MySQL and MariaDB, so the database is where large catalogues, order histories and plugin tables start to hurt.

02

PHP and Laravel applications

Laravel, Symfony and older PHP codebases are commonly built and tested against MySQL, and their migrations assume its behaviour.

03

Read-heavy web workloads

Content sites and storefronts where a primary takes writes and replicas or a cache serve most reads.

04

Teams with existing MySQL skills

When your developers, hosting provider and tooling already revolve around MySQL, staying on it is usually cheaper than switching.

When we recommend something else

  • Odoo — it runs only on PostgreSQL, so MySQL is not an option for the ERP database.
  • Applications that depend on PostGIS-grade geospatial queries, rich extensions or transactional schema changes, where PostgreSQL is the stronger fit.
  • Large analytical queries over billions of rows — a columnar warehouse will answer them faster and cheaper.
Deliverables

MySQL work we take on

WooCommerce database cleanup

Bloated autoloaded options, orphaned postmeta, expired transients and missing indexes found and fixed, with HPOS order tables where the store is ready for them.

Query and index tuning

Slow-query log and pt-query-digest analysis, EXPLAIN plans, and composite indexes added where they help rather than everywhere.

Replication and failover

Source–replica replication with GTIDs, read routing through ProxySQL, and a documented promotion procedure.

Version upgrades and migrations

Moves to a supported release such as MySQL 8.4 LTS, or between MySQL and MariaDB, tested against a copy of production first.

Architecture

A MySQL setup for a busy store or app

L1

Application and object cache

WordPress, WooCommerce or a PHP app, with Redis or Memcached absorbing repeated reads before they reach MySQL.

L2

Query routing

ProxySQL or MySQL Router sends writes to the primary and eligible reads to replicas.

L3

Primary server

InnoDB buffer pool, redo log and connection limits sized for the dataset and the traffic pattern.

L4

Replicas

Asynchronous or semi-synchronous replicas for reporting, backups and failover.

L5

Backups and monitoring

Percona XtraBackup or mysqldump with binary logs for point-in-time recovery, plus alerts on replication lag and slow queries.

Layered architecture of a MySQL project: Application and object cache, then Query routing, then Primary server, then Replicas, then Backups and monitoring.

Ecosystem we work with

  • InnoDB
  • Percona XtraBackup
  • Percona Toolkit
  • ProxySQL
  • MySQL Router
  • MySQL Shell
  • Group Replication
  • MariaDB
  • Redis object cache
  • Amazon RDS for MySQL
  • phpMyAdmin
Speed & safety

What tuned MySQL changes for the business

01

Faster admin and checkout

Most WooCommerce slowness traces back to a handful of unindexed meta queries or oversized autoload data, both fixable without a rewrite.

02

Reads that scale out

Replicas and an object cache take reporting and catalogue traffic off the primary that handles orders.

03

Supported, patched versions

Staying on a maintained release keeps security fixes flowing and avoids being forced into a rushed upgrade later.

04

Point-in-time recovery

Binary logs plus regular backups let you restore to just before a bad plugin update or mistaken bulk edit.

Compare

MySQL or MariaDB?

Practical differences between MySQL and MariaDB for web applications
ConsiderationMySQLMariaDB
MaintainerOracle, with Community and Enterprise editionsMariaDB Foundation and MariaDB plc
WordPress supportSupportedSupported
JSONNative binary JSON typeJSON stored as text with validation
Replication and clusteringGTID replication, Group Replication, InnoDB ClusterIts own GTID format, Galera Cluster
Switching between themDumps usually import cleanly from older versionsRecent versions diverge; test before migrating either way
Keep exploring
Sources

Sources and further reading

Official documentation and guidance if you want to read more about this topic.

FAQ

MySQL questions

Why is my WooCommerce database slow?

The usual causes are large wp_postmeta and wp_options tables, too much autoloaded data, missing indexes for plugin queries, and an undersized InnoDB buffer pool. Moving orders to High-Performance Order Storage and cleaning up plugin leftovers often helps more than a bigger server.

Is MariaDB a drop-in replacement for MySQL?

Not reliably any more. MariaDB began as a fork of MySQL and is still compatible for typical WordPress and PHP workloads, but JSON handling, replication, authentication and some SQL features now differ, so a migration in either direction should be tested.

Which MySQL version should we run?

Run a release that is still receiving security updates. Oracle designates long-term support releases such as MySQL 8.4 for production use, and installations on older series should plan an upgrade with testing on a production copy.

Should we move from MySQL to PostgreSQL?

Only if there is a concrete reason, such as adopting Odoo, needing PostGIS, or hitting a feature MySQL lacks. For WordPress and most PHP applications, a well-tuned MySQL is the simpler and better-supported choice.

Can MySQL run on a managed cloud service?

Yes. Amazon RDS and Aurora, Google Cloud SQL and Azure Database for MySQL handle patching, backups and failover; we tune the parameter groups, queries and indexes, which managed services leave to you.

Next step

Store or app slowing down as the data grows?

Send us your MySQL or MariaDB version, hosting setup and the pages that feel slow. We'll look at the slow-query log and tell you what's causing it.