{"id":2193,"date":"2026-08-11T09:00:00","date_gmt":"2026-08-11T09:00:00","guid":{"rendered":"https:\/\/gigatech.nl\/?p=2193"},"modified":"2026-08-07T21:47:48","modified_gmt":"2026-08-07T21:47:48","slug":"optimise-wordpress-database-queries-indexes-redis","status":"publish","type":"post","link":"https:\/\/gigatech.nl\/en\/optimise-wordpress-database-queries-indexes-redis\/","title":{"rendered":"Optimising a WordPress Database: Queries, Indexes, Redis and I\/O"},"content":{"rendered":"<p>A slow WordPress site does not automatically have a \u201cslow database\u201d. The database may be waiting for storage, repeatedly executing one expensive query, loading too much data, or receiving a queue of requests from PHP. Effective optimisation starts with measurement, not copied configuration values.<\/p>\n<figure class=\"wp-block-image size-full\"><img class=\"lazyload\" src=\"data:image\/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==\" data-orig-src=\"https:\/\/gigatech.nl\/wp-content\/uploads\/2026\/08\/database-performance.jpg\" alt=\"Gigatech database analysis showing a slow query becoming an optimised query path\" loading=\"eager\" decoding=\"async\" \/><\/figure>\n<h2>Measure where the time is spent<\/h2>\n<p>Compare fast and slow URLs, authenticated and anonymous requests, and cache hits with misses. Use slow-query logs or application profiling to see query duration, volume and repetition. Five slow queries need a different solution from five hundred small ones.<\/p>\n<h2>Indexes: faster reads with a cost<\/h2>\n<p>An index may prevent a full table scan, but consumes storage and adds write overhead. Do not add indexes by instinct. Analyse WHERE, JOIN and ORDER BY patterns, inspect the query plan and test with realistic data. Remove duplicates only after verification.<\/p>\n<h2>WordPress database growth<\/h2>\n<p>Autoloaded options, expired transients, revisions, sessions and abandoned plugin tables may grow. Blind cleanup is risky: a large option can be legitimate and an unfamiliar table may contain orders. Back up first and identify ownership and use.<\/p>\n<h2>Object caching with Redis<\/h2>\n<p>Redis keeps frequently used objects and query results in memory. It is most useful when WordPress must build a page dynamically. A full-page cache often avoids PHP and the database entirely. Redis therefore complements page caching; it does not repair poor queries. See our <a href=\"https:\/\/gigatech.nl\/en\/why-we-use-litespeed\/\">LiteSpeed guide<\/a>.<\/p>\n<h2>Buffers and memory<\/h2>\n<p>Database buffers must fit the dataset, workload and total available memory. Too little creates I\/O; an excessive allocation starves the operating system and other services. Tune from current metrics and change one group at a time.<\/p>\n<h2>Hosting isolation and database load<\/h2>\n<p>CloudLinux makes per-account resource use visible and bounded. This protects neighbouring sites, while an account repeatedly reaching its limits still requires optimisation or a suitable plan. Also read <a href=\"https:\/\/gigatech.nl\/en\/php-opcache-workers-wordpress-performance\/\">PHP, OPcache and workers<\/a>.<\/p>\n<h2>Safe optimisation plan<\/h2>\n<ol>\n<li>Create a recoverable backup and baseline.<\/li>\n<li>Identify slow URLs, queries and peak periods.<\/li>\n<li>Fix application and query problems before global tuning.<\/li>\n<li>Test indexes, caching and cleanup on staging.<\/li>\n<li>Deploy one change at a time.<\/li>\n<li>Compare response time, CPU, I\/O and errors afterwards.<\/li>\n<\/ol>\n<h2>Frequently asked questions<\/h2>\n<h3>Does every WordPress site need Redis?<\/h3>\n<p>No. Its value depends on dynamic database activity and cache behaviour.<\/p>\n<h3>Does table optimisation always help?<\/h3>\n<p>No, and it rarely fixes structurally inefficient queries.<\/p>\n<h3>Is more RAM automatically faster?<\/h3>\n<p>Only when memory is the real bottleneck and the allocation is used effectively.<\/p>\n<p>Need database analysis? Send the URL, time and observed behaviour through the <a href=\"https:\/\/portal.gigatech.nl\/submitticket.php?language=english\">support portal<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Improve WordPress database performance using measurements, query plans, indexes, Redis, buffers and safely tested changes.<\/p>\n","protected":false},"author":0,"featured_media":2172,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"ai_generated_summary":"","footnotes":""},"categories":[87],"tags":[],"class_list":["post-2193","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-blog"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.2 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Optimise a WordPress Database | Gigatech<\/title>\n<meta name=\"description\" content=\"Optimise WordPress database performance using slow-query analysis, indexes, Redis, safe cleanup and evidence-based buffer tuning.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/gigatech.nl\/en\/optimise-wordpress-database-queries-indexes-redis\/\" \/>\n<meta property=\"og:locale\" content=\"en_GB\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Optimise a WordPress Database | Gigatech\" \/>\n<meta property=\"og:description\" content=\"Optimise WordPress database performance using slow-query analysis, indexes, Redis, safe cleanup and evidence-based buffer tuning.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/gigatech.nl\/en\/optimise-wordpress-database-queries-indexes-redis\/\" \/>\n<meta property=\"og:site_name\" content=\"GiGatech.nl\" \/>\n<meta property=\"article:published_time\" content=\"2026-08-11T09:00:00+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/gigatech.nl\/wp-content\/uploads\/2026\/07\/gigatech_exact_light_original.png\" \/>\n\t<meta property=\"og:image:width\" content=\"300\" \/>\n\t<meta property=\"og:image:height\" content=\"49\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Estimated reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":[\"Article\",\"BlogPosting\"],\"@id\":\"https:\\\/\\\/gigatech.nl\\\/en\\\/optimise-wordpress-database-queries-indexes-redis\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/gigatech.nl\\\/en\\\/optimise-wordpress-database-queries-indexes-redis\\\/\"},\"author\":{\"name\":\"\",\"@id\":\"\"},\"headline\":\"Optimising a WordPress Database: Queries, Indexes, Redis and I\\\/O\",\"datePublished\":\"2026-08-11T09:00:00+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/gigatech.nl\\\/en\\\/optimise-wordpress-database-queries-indexes-redis\\\/\"},\"wordCount\":425,\"publisher\":{\"@id\":\"https:\\\/\\\/gigatech.nl\\\/en\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/gigatech.nl\\\/en\\\/optimise-wordpress-database-queries-indexes-redis\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/gigatech.nl\\\/wp-content\\\/uploads\\\/2026\\\/08\\\/database-performance.avif\",\"articleSection\":[\"Blog\"],\"inLanguage\":\"en-GB\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/gigatech.nl\\\/en\\\/optimise-wordpress-database-queries-indexes-redis\\\/\",\"url\":\"https:\\\/\\\/gigatech.nl\\\/en\\\/optimise-wordpress-database-queries-indexes-redis\\\/\",\"name\":\"Optimise a WordPress Database | Gigatech\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/gigatech.nl\\\/en\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/gigatech.nl\\\/en\\\/optimise-wordpress-database-queries-indexes-redis\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/gigatech.nl\\\/en\\\/optimise-wordpress-database-queries-indexes-redis\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/gigatech.nl\\\/wp-content\\\/uploads\\\/2026\\\/08\\\/database-performance.avif\",\"datePublished\":\"2026-08-11T09:00:00+00:00\",\"description\":\"Optimise WordPress database performance using slow-query analysis, indexes, Redis, safe cleanup and evidence-based buffer tuning.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/gigatech.nl\\\/en\\\/optimise-wordpress-database-queries-indexes-redis\\\/#breadcrumb\"},\"inLanguage\":\"en-GB\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/gigatech.nl\\\/en\\\/optimise-wordpress-database-queries-indexes-redis\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\\\/\\\/gigatech.nl\\\/en\\\/optimise-wordpress-database-queries-indexes-redis\\\/#primaryimage\",\"url\":\"https:\\\/\\\/gigatech.nl\\\/wp-content\\\/uploads\\\/2026\\\/08\\\/database-performance.avif\",\"contentUrl\":\"https:\\\/\\\/gigatech.nl\\\/wp-content\\\/uploads\\\/2026\\\/08\\\/database-performance.avif\",\"width\":1672,\"height\":941,\"caption\":\"Databasequery optimaliseren met indexen en caching\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/gigatech.nl\\\/en\\\/optimise-wordpress-database-queries-indexes-redis\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/gigatech.nl\\\/en\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Optimising a WordPress Database: Queries, Indexes, Redis and I\\\/O\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/gigatech.nl\\\/en\\\/#website\",\"url\":\"https:\\\/\\\/gigatech.nl\\\/en\\\/\",\"name\":\"GiGatech.nl\",\"description\":\"Hosting &amp; Webdesign\",\"publisher\":{\"@id\":\"https:\\\/\\\/gigatech.nl\\\/en\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/gigatech.nl\\\/en\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-GB\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/gigatech.nl\\\/en\\\/#organization\",\"name\":\"Gigatech webhosting and design\",\"alternateName\":\"Gigatech\",\"url\":\"https:\\\/\\\/gigatech.nl\\\/en\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\\\/\\\/gigatech.nl\\\/en\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/gigatech.nl\\\/wp-content\\\/uploads\\\/2026\\\/08\\\/gigatech_social_landscape_1200x630_light-scaled.avif\",\"contentUrl\":\"https:\\\/\\\/gigatech.nl\\\/wp-content\\\/uploads\\\/2026\\\/08\\\/gigatech_social_landscape_1200x630_light-scaled.avif\",\"width\":2560,\"height\":1344,\"caption\":\"Gigatech webhosting and design\"},\"image\":{\"@id\":\"https:\\\/\\\/gigatech.nl\\\/en\\\/#\\\/schema\\\/logo\\\/image\\\/\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Optimise a WordPress Database | Gigatech","description":"Optimise WordPress database performance using slow-query analysis, indexes, Redis, safe cleanup and evidence-based buffer tuning.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/gigatech.nl\/en\/optimise-wordpress-database-queries-indexes-redis\/","og_locale":"en_GB","og_type":"article","og_title":"Optimise a WordPress Database | Gigatech","og_description":"Optimise WordPress database performance using slow-query analysis, indexes, Redis, safe cleanup and evidence-based buffer tuning.","og_url":"https:\/\/gigatech.nl\/en\/optimise-wordpress-database-queries-indexes-redis\/","og_site_name":"GiGatech.nl","article_published_time":"2026-08-11T09:00:00+00:00","og_image":[{"width":300,"height":49,"url":"https:\/\/gigatech.nl\/wp-content\/uploads\/2026\/07\/gigatech_exact_light_original.png","type":"image\/png"}],"twitter_card":"summary_large_image","twitter_misc":{"Estimated reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":["Article","BlogPosting"],"@id":"https:\/\/gigatech.nl\/en\/optimise-wordpress-database-queries-indexes-redis\/#article","isPartOf":{"@id":"https:\/\/gigatech.nl\/en\/optimise-wordpress-database-queries-indexes-redis\/"},"author":{"name":"","@id":""},"headline":"Optimising a WordPress Database: Queries, Indexes, Redis and I\/O","datePublished":"2026-08-11T09:00:00+00:00","mainEntityOfPage":{"@id":"https:\/\/gigatech.nl\/en\/optimise-wordpress-database-queries-indexes-redis\/"},"wordCount":425,"publisher":{"@id":"https:\/\/gigatech.nl\/en\/#organization"},"image":{"@id":"https:\/\/gigatech.nl\/en\/optimise-wordpress-database-queries-indexes-redis\/#primaryimage"},"thumbnailUrl":"https:\/\/gigatech.nl\/wp-content\/uploads\/2026\/08\/database-performance.avif","articleSection":["Blog"],"inLanguage":"en-GB"},{"@type":"WebPage","@id":"https:\/\/gigatech.nl\/en\/optimise-wordpress-database-queries-indexes-redis\/","url":"https:\/\/gigatech.nl\/en\/optimise-wordpress-database-queries-indexes-redis\/","name":"Optimise a WordPress Database | Gigatech","isPartOf":{"@id":"https:\/\/gigatech.nl\/en\/#website"},"primaryImageOfPage":{"@id":"https:\/\/gigatech.nl\/en\/optimise-wordpress-database-queries-indexes-redis\/#primaryimage"},"image":{"@id":"https:\/\/gigatech.nl\/en\/optimise-wordpress-database-queries-indexes-redis\/#primaryimage"},"thumbnailUrl":"https:\/\/gigatech.nl\/wp-content\/uploads\/2026\/08\/database-performance.avif","datePublished":"2026-08-11T09:00:00+00:00","description":"Optimise WordPress database performance using slow-query analysis, indexes, Redis, safe cleanup and evidence-based buffer tuning.","breadcrumb":{"@id":"https:\/\/gigatech.nl\/en\/optimise-wordpress-database-queries-indexes-redis\/#breadcrumb"},"inLanguage":"en-GB","potentialAction":[{"@type":"ReadAction","target":["https:\/\/gigatech.nl\/en\/optimise-wordpress-database-queries-indexes-redis\/"]}]},{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/gigatech.nl\/en\/optimise-wordpress-database-queries-indexes-redis\/#primaryimage","url":"https:\/\/gigatech.nl\/wp-content\/uploads\/2026\/08\/database-performance.avif","contentUrl":"https:\/\/gigatech.nl\/wp-content\/uploads\/2026\/08\/database-performance.avif","width":1672,"height":941,"caption":"Databasequery optimaliseren met indexen en caching"},{"@type":"BreadcrumbList","@id":"https:\/\/gigatech.nl\/en\/optimise-wordpress-database-queries-indexes-redis\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/gigatech.nl\/en\/"},{"@type":"ListItem","position":2,"name":"Optimising a WordPress Database: Queries, Indexes, Redis and I\/O"}]},{"@type":"WebSite","@id":"https:\/\/gigatech.nl\/en\/#website","url":"https:\/\/gigatech.nl\/en\/","name":"GiGatech.nl","description":"Hosting &amp; Webdesign","publisher":{"@id":"https:\/\/gigatech.nl\/en\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/gigatech.nl\/en\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-GB"},{"@type":"Organization","@id":"https:\/\/gigatech.nl\/en\/#organization","name":"Gigatech webhosting and design","alternateName":"Gigatech","url":"https:\/\/gigatech.nl\/en\/","logo":{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/gigatech.nl\/en\/#\/schema\/logo\/image\/","url":"https:\/\/gigatech.nl\/wp-content\/uploads\/2026\/08\/gigatech_social_landscape_1200x630_light-scaled.avif","contentUrl":"https:\/\/gigatech.nl\/wp-content\/uploads\/2026\/08\/gigatech_social_landscape_1200x630_light-scaled.avif","width":2560,"height":1344,"caption":"Gigatech webhosting and design"},"image":{"@id":"https:\/\/gigatech.nl\/en\/#\/schema\/logo\/image\/"}}]}},"_links":{"self":[{"href":"https:\/\/gigatech.nl\/en\/wp-json\/wp\/v2\/posts\/2193","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/gigatech.nl\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/gigatech.nl\/en\/wp-json\/wp\/v2\/types\/post"}],"replies":[{"embeddable":true,"href":"https:\/\/gigatech.nl\/en\/wp-json\/wp\/v2\/comments?post=2193"}],"version-history":[{"count":1,"href":"https:\/\/gigatech.nl\/en\/wp-json\/wp\/v2\/posts\/2193\/revisions"}],"predecessor-version":[{"id":2209,"href":"https:\/\/gigatech.nl\/en\/wp-json\/wp\/v2\/posts\/2193\/revisions\/2209"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/gigatech.nl\/en\/wp-json\/wp\/v2\/media\/2172"}],"wp:attachment":[{"href":"https:\/\/gigatech.nl\/en\/wp-json\/wp\/v2\/media?parent=2193"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/gigatech.nl\/en\/wp-json\/wp\/v2\/categories?post=2193"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/gigatech.nl\/en\/wp-json\/wp\/v2\/tags?post=2193"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}