{"id":30083,"date":"2017-05-29T23:01:39","date_gmt":"2017-05-29T15:01:39","guid":{"rendered":"https:\/\/www.hongkiat.com\/blog\/?p=30083"},"modified":"2022-10-18T20:12:18","modified_gmt":"2022-10-18T12:12:18","slug":"trimming-wordpress-database","status":"publish","type":"post","link":"https:\/\/www.hongkiat.com\/blog\/trimming-wordpress-database\/","title":{"rendered":"Best Practices to Trim Your WordPress Database"},"content":{"rendered":"<p>A clean <a href=\"https:\/\/www.hongkiat.com\/blog\/install-wordpress-locally-vagrant\/\">WordPress installation<\/a> <strong>starts with 12 database tables<\/strong> by default, however, with time, data quickly adds up. Your numerous <strong>posts<\/strong>, <strong>pages<\/strong>, <strong>comments<\/strong>, <strong>options<\/strong>, and <strong>settings<\/strong> are all saved into the database. Moreover, many <strong>plugins<\/strong> (and sometimes even <strong>themes<\/strong>) also create their own database tables. But a lot of these data <strong>get redundant<\/strong> after a while.<\/p>\n<p>Sooner or later, the <strong>database overhead can feel crippling<\/strong>. Your server slows down, page load time grows, export and import get harder, and <strong>creating a backup can take ages<\/strong>.<\/p>\n<p class=\"recommended_top\">\n\t\t\t\t\t<strong>Read Also:<\/strong>\u00a0\n\t\t\t\t\t<a target=\"_blank\" href=\"https:\/\/www.hongkiat.com\/blog\/sync-db-multiple-wordpress\/\">How to Sync Databases Across Multiple WordPress Installs<\/a>\n\t\t\t\t<\/p>\n<p>So, in this article, we\u2019ll look into the <strong>best practices to trim your WordPress database<\/strong>. Even if you don\u2019t have problems right now, it\u2019s worth considering a clean-up as it can <strong>improve the performance of your website<\/strong>, speed up your backup workflow, and make site maintenance more manageable.<\/p>\n<figure><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/assets.hongkiat.com\/uploads\/trimming-wordpress-database\/wp-database.jpg\" width=\"800\" height=\"438\" alt=\"WordPress database\"><\/figure>\n<p>Don\u2019t forget to <strong>back up the <a href=\"https:\/\/codex.wordpress.org\/WordPress_Backups#Database_Backup_Instructions\" target=\"_blank\" rel=\"noopener\">database<\/a><\/strong> before you start  so that you don\u2019t lose anything <strong>if something goes wrong during the clean-up<\/strong>.<\/p>\n<h2>1. Perform a manual clean-up<\/h2>\n<p>There are many redundant data items you can <strong>remove manually<\/strong>, simply <strong>from the WordPress admin<\/strong>.<\/p>\n<h3>Remove posts you don\u2019t need<\/h3>\n<p>WordPress saves <strong>all post types<\/strong> (posts, pages, custom post types) into the <code>wp_posts<\/code> table and the related metadata to <code>wp_postmeta<\/code>.<\/p>\n<p>If you <strong>empty the trash<\/strong> in the \u201cPosts\u201d and \u201cPages\u201d panels in your WordPress admin you already get rid of a lot of unnecessary data. If you have many <strong>drafts and pending posts<\/strong> it\u2019s also a good idea to go through them and delete what you don\u2019t need.<\/p>\n<figure><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/assets.hongkiat.com\/uploads\/trimming-wordpress-database\/empty-trash.jpg\" width=\"800\" height=\"453\" alt=\"Empty trash\"><\/figure>\n<p>Note that media items (the content of the \u201cMedia\u201d panel) are <strong>not stored in the database<\/strong> but in the <code>\/wp-content\/uploads\/<\/code> folder.<\/p>\n<h3>Remove unused categories and tags<\/h3>\n<p>If you have too many <strong>categories and tags you don\u2019t use<\/strong> it\u2019s also worth deleting the ones you don\u2019t need. Categories and tags are the two <a href=\"https:\/\/codex.wordpress.org\/Taxonomies\" target=\"_blank\" rel=\"noopener\">taxonomy types<\/a> you can access from the WP admin. By <strong>removing the unnecessary ones<\/strong>, you can free up space in the <code>wp_terms<\/code>, <code>wp_term_relationships<\/code>, and <code>wp_term_taxonomy<\/code> database tables.<\/p>\n<h3>Delete unused plugins and themes<\/h3>\n<p>By default, plugins are saved into the <code>\/wp-content\/plugins\/<\/code> folder, while themes go into <code>\/wp-content\/themes\/<\/code>. However, many plugins as well as some themes <strong>create their own custom database tables<\/strong>. They also frequently <strong>save options<\/strong> into the <code>wp-options<\/code> table.<\/p>\n<p>Therefore, deleting unnecessary plugins and themes can free up significant space in your database. However, for that you <strong>have to delete them, instead of deactivating<\/strong>.<\/p>\n<h3>Remove comments you don\u2019t need<\/h3>\n<p>You can remove <strong>unapproved, spam, and trashed comments<\/strong> from the \u201cComments\u201d panel in your WordPress admin. This way, you can reduce the size of the <code>wp_comments<\/code> and <code>wp_commentmeta<\/code> tables.<\/p>\n<p>If your site receives many comments it\u2019s also a good idea to consider using a <a href=\"https:\/\/www.hongkiat.com\/blog\/3rdparty-comment-discuss-systems-reviewed\/\">third-party commenting system<\/a>, such as Disqus or Livefyre, so that you don\u2019t have to store comments in your database at all.<\/p>\n<h2>2. Optimize your database via phpMyAdmin<\/h2>\n<h3>Access phpMyAdmin<\/h3>\n<p><strong><a href=\"https:\/\/www.phpmyadmin.net\/\" target=\"_blank\" rel=\"noopener\">phpMyAdmin<\/a><\/strong> is a software that enables you to <strong>manage your MySQL database<\/strong>. In your cPanel, find the <strong>\u201cDatabases\u201d<\/strong> section and simply click the phpMyAdmin icon.<\/p>\n<figure><a href=\"https:\/\/cpanel.com\/demo\/\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/assets.hongkiat.com\/uploads\/trimming-wordpress-database\/cpanel-phpmyadmin.jpg\" width=\"800\" height=\"431\" alt=\"cPanel phpMyAdmin\"><\/a><\/figure>\n<p>If you are on your local machine you can find phpMyAdmin <strong>on your local web server<\/strong>, usually on the <code>http:\/\/localhost\/phpmyadmin<\/code> URL.<\/p>\n<h3>Remove database overhead<\/h3>\n<p>phpMyAdmin has a feature that allows you to <strong>optimize your database<\/strong>. The <strong><code>Table maintenance &gt; Optimize table<\/code> option<\/strong> runs the <strong><a href=\"https:\/\/dev.mysql.com\/doc\/refman\/5.7\/en\/optimize-table.html\" target=\"_blank\" rel=\"noopener nofollow\"><code>OPTIMIZE TABLE<\/code> MySQL-query<\/a><\/strong> for the selected tables and <strong>removes the overhead<\/strong> of your database.<\/p>\n<p>As you can see on the screenshot below, phpMyAdmin <strong>shows if you have overhead<\/strong> in a table (last column). Select the <strong>tables that have overhead<\/strong>, or select all tables if you want, and run the query.<\/p>\n<figure><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/assets.hongkiat.com\/uploads\/trimming-wordpress-database\/optimize-table.jpg\" width=\"800\" height=\"431\" alt=\"Optimize table\"><\/figure>\n<p>If you have a <strong>corrupted table in your database<\/strong> you can repair it by selecting the <strong>\u201cRepair table\u201d option<\/strong> (it\u2019s below \u201cOptimize table\u201d) that runs the <strong><a href=\"https:\/\/dev.mysql.com\/doc\/refman\/5.7\/en\/repair-table.html\" target=\"_blank\" rel=\"noopener nofollow\"><code>REPAIR TABLE<\/code> MySQL-query<\/a><\/strong>.<\/p>\n<h2>3. Use WP\u2019s built-in database optimization<\/h2>\n<p>WordPress also has an <strong><a href=\"https:\/\/codex.wordpress.org\/Editing_wp-config.php#Automatic_Database_Optimizing\" target=\"_blank\" rel=\"noopener\">automated database optimization tool<\/a><\/strong>. To access it, you have to <strong>edit the <code>wp-config.php<\/code> file<\/strong>. This is the <strong>configuration file<\/strong> of your WordPress-install. You can find it <strong>in your root folder<\/strong> that you can access via FTP (SFTP).<\/p>\n<p>Open the <code>wp-config.php<\/code> file in a code editor, and add the following line <strong>to the beginning, after the starting PHP tag<\/strong> (<code>&lt;?php<\/code>):<\/p>\n<pre>\r\ndefine( 'WP_ALLOW_REPAIR', true );\r\n<\/pre>\n<figure><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/assets.hongkiat.com\/uploads\/trimming-wordpress-database\/wp-config-opt.jpg\" width=\"800\" height=\"594\" alt=\"wp-config database optimization\"><\/figure>\n<p>Save the <code>wp-config.php<\/code> file and <strong>open the <code>http:\/\/yoursite.com\/wp-admin\/maint\/repair.php<\/code> URL path<\/strong>. You will find yourself on the following screen:<\/p>\n<figure><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/assets.hongkiat.com\/uploads\/trimming-wordpress-database\/automatic-wp-opt.jpg\" width=\"800\" height=\"392\" alt=\"Automatic WP optimization\"><\/figure>\n<p><strong>\u201cRepair Database\u201d<\/strong> option looks for and fixes <strong>common database problems<\/strong>. The other option, <strong>\u201cRepair and Optimize Database\u201d<\/strong> also tries to <strong>optimize the database<\/strong> that can improve the performance (page load time) of your website.<\/p>\n<p>Note that if you choose the latter, <strong>your database will be locked<\/strong> until the task is performed (you can\u2019t save, edit or delete, etc. the scontent).<\/p>\n<p>When you\u2019re finished <strong>don\u2019t forget to remove<\/strong> the <code>define( 'WP_ALLOW_REPAIR', true );<\/code> line from the <code>wp-config.php<\/code> file, as the database optimization tool can be <strong>accessed by anyone<\/strong> not just by admins.<\/p>\n<h2>4. Trim your database with plugins<\/h2>\n<p>There are <strong>more complicated database optimization tasks<\/strong>, such as removing expired transients, orphan meta items, duplicate items, and former post revisions, that are the safest to do by using <strong>database clean-up plugins<\/strong>.<\/p>\n<p>Below, you can find the <strong>best free plugins<\/strong> you can use to further trim your database. These plugins also perform some of the tasks I mentioned in the \u201cManual clean-up\u201d section which means <strong>you don\u2019t necessarily have to do these manually<\/strong>.<\/p>\n<h3><a href=\"https:\/\/wordpress.org\/plugins\/wp-optimize\/\" target=\"_blank\" rel=\"noopener\">WP-Optimize<\/a><\/h3>\n<p>The WP-Optimize plugin <strong>removes trashed and unapproved comments<\/strong>, pingbacks, trackbacks,  expired transient options, cleans the <code>wp_postmeta<\/code> table and orphaned relationship data, and <strong>has many other great features<\/strong>.<\/p>\n<p>In the options panel, you can select which tasks you want to perform. Moreover, you can also <strong>schedule automatic weekly clean-ups<\/strong>, according to your specification.<\/p>\n<figure><a href=\"https:\/\/wordpress.org\/plugins\/wp-optimize\/\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/assets.hongkiat.com\/uploads\/trimming-wordpress-database\/wp-optimize.jpg\" width=\"800\" height=\"444\" alt=\"WP-Optimize\"><\/a><\/figure>\n<h3><a href=\"https:\/\/wordpress.org\/plugins\/wp-sweep\/\" target=\"_blank\" rel=\"noopener\">WP Sweep<\/a><\/h3>\n<p>The WP Sweep plugin has similar functions to the aforementioned WP-Optimize, for instance, it can be used to remove trashed posts and comments, <strong>duplicate post meta, transient options, orphaned meta<\/strong>, etc.<\/p>\n<p>WPBeginner has an <a href=\"https:\/\/www.wpbeginner.com\/plugins\/how-to-clean-up-your-wordpress-database-for-improved-performance\/\" target=\"_blank\" rel=\"noopener\">interesting post<\/a> in which they argue for WP Sweep (as opposed to WP-Optimize) as it \u201c<strong>uses proper WordPress delete functions<\/strong> as much as possible instead of running direct delete MySQL queries\u201d. Both plugins are great, <strong>choose whichever you like more, you won\u2019t go wrong with any of them<\/strong>.<\/p>\n<figure><a href=\"https:\/\/wordpress.org\/plugins\/wp-sweep\/\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/assets.hongkiat.com\/uploads\/trimming-wordpress-database\/wp-sweep.jpg\" width=\"800\" height=\"454\" alt=\"WP Sweep\"><\/a><\/figure>\n<h3><a href=\"https:\/\/wordpress.org\/plugins\/rvg-optimize-database\/\" target=\"_blank\" rel=\"noopener\">Optimize Database after Deleting Revisions<\/a><\/h3>\n<p>With this plugin, you can delete trashed items, expired transients, pingbacks, trackbacks, spam, etc. Moreover, you can opt for <strong>keeping a log and set up<\/strong> an hourly, twice a daily, daily, weekly, or monthly <strong>optimization scheduler<\/strong>.<\/p>\n<p>Just as its name says, before the database optimization, it <strong>deletes post revisions<\/strong> that usually take up a huge place in the database. In the options panel, you can select <strong>how many revisions<\/strong> you want to keep and also the <strong>age of the revisions<\/strong> that can be deleted. This plugin is <strong>multisite-compatible<\/strong> as well, which is a huge plus.<\/p>\n<figure><a href=\"https:\/\/wordpress.org\/plugins\/rvg-optimize-database\/\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/assets.hongkiat.com\/uploads\/trimming-wordpress-database\/opt-db-after-del-rev.jpg\" width=\"800\" height=\"451\" alt=\"Optimize Database after Deleting Revisions\"><\/a><\/figure>\n<p class=\"recommended_top\">\n\t\t\t\t\t<strong>Read Also:<\/strong>\u00a0\n\t\t\t\t\t<a target=\"_blank\" href=\"https:\/\/www.hongkiat.com\/blog\/wp-plugins-migrate-blog-website\/\">10 WordPress Plugins to Migrate WordPress Sites \u2013 Best of<\/a>\n\t\t\t\t<\/p>","protected":false},"excerpt":{"rendered":"<p>A clean WordPress installation starts with 12 database tables by default, however, with time, data quickly adds up. Your numerous posts, pages, comments, options, and settings are all saved into the database. Moreover, many plugins (and sometimes even themes) also create their own database tables. But a lot of these data get redundant after a&hellip;<\/p>\n","protected":false},"author":146,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[49],"tags":[4663,3733,252],"topic":[4520],"class_list":["entry-content","is-maxi"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v22.8 (Yoast SEO v27.4) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Best Practices to Trim Your WordPress Database - Hongkiat<\/title>\n<meta name=\"description\" content=\"A clean WordPress installation starts with 12 database tables by default, however, with time, data quickly adds up. Your numerous posts, pages, comments,\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.hongkiat.com\/blog\/trimming-wordpress-database\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Best Practices to Trim Your WordPress Database\" \/>\n<meta property=\"og:description\" content=\"A clean WordPress installation starts with 12 database tables by default, however, with time, data quickly adds up. Your numerous posts, pages, comments,\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.hongkiat.com\/blog\/trimming-wordpress-database\/\" \/>\n<meta property=\"og:site_name\" content=\"Hongkiat\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/hongkiatcom\" \/>\n<meta property=\"article:published_time\" content=\"2017-05-29T15:01:39+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-10-18T12:12:18+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/assets.hongkiat.com\/uploads\/trimming-wordpress-database\/wp-database.jpg\" \/>\n<meta name=\"author\" content=\"Anna Monus\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@hongkiat\" \/>\n<meta name=\"twitter:site\" content=\"@hongkiat\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Anna Monus\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/trimming-wordpress-database\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/trimming-wordpress-database\\\/\"},\"author\":{\"name\":\"Anna Monus\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#\\\/schema\\\/person\\\/a601053a0ab457901e00cdc83bd5359e\"},\"headline\":\"Best Practices to Trim Your WordPress Database\",\"datePublished\":\"2017-05-29T15:01:39+00:00\",\"dateModified\":\"2022-10-18T12:12:18+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/trimming-wordpress-database\\\/\"},\"wordCount\":1091,\"commentCount\":3,\"publisher\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/trimming-wordpress-database\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/assets.hongkiat.com\\\/uploads\\\/trimming-wordpress-database\\\/wp-database.jpg\",\"keywords\":[\"ad-divi\",\"wordpress optimization\",\"WordPress Tips\"],\"articleSection\":[\"WordPress\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/trimming-wordpress-database\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/trimming-wordpress-database\\\/\",\"url\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/trimming-wordpress-database\\\/\",\"name\":\"Best Practices to Trim Your WordPress Database - Hongkiat\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/trimming-wordpress-database\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/trimming-wordpress-database\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/assets.hongkiat.com\\\/uploads\\\/trimming-wordpress-database\\\/wp-database.jpg\",\"datePublished\":\"2017-05-29T15:01:39+00:00\",\"dateModified\":\"2022-10-18T12:12:18+00:00\",\"description\":\"A clean WordPress installation starts with 12 database tables by default, however, with time, data quickly adds up. Your numerous posts, pages, comments,\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/trimming-wordpress-database\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/trimming-wordpress-database\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/trimming-wordpress-database\\\/#primaryimage\",\"url\":\"https:\\\/\\\/assets.hongkiat.com\\\/uploads\\\/trimming-wordpress-database\\\/wp-database.jpg\",\"contentUrl\":\"https:\\\/\\\/assets.hongkiat.com\\\/uploads\\\/trimming-wordpress-database\\\/wp-database.jpg\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/trimming-wordpress-database\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Best Practices to Trim Your WordPress Database\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/\",\"name\":\"Hongkiat\",\"description\":\"Tech and Design Tips\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#organization\",\"name\":\"Hongkiat.com\",\"url\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/wp-content\\\/uploads\\\/hkdc-logo-rect-yoast.jpg\",\"contentUrl\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/wp-content\\\/uploads\\\/hkdc-logo-rect-yoast.jpg\",\"width\":1200,\"height\":799,\"caption\":\"Hongkiat.com\"},\"image\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/hongkiatcom\",\"https:\\\/\\\/x.com\\\/hongkiat\",\"https:\\\/\\\/www.pinterest.com\\\/hongkiat\\\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#\\\/schema\\\/person\\\/a601053a0ab457901e00cdc83bd5359e\",\"name\":\"Anna Monus\",\"description\":\"Anna is Technical Editor and Writer for Hongkiat.com. She mainly covers front-end frameworks, web standards, accessibility, WordPress development, and UX design.\",\"sameAs\":[\"https:\\\/\\\/www.annalytic.com\\\/\"],\"url\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/author\\\/anna_monus\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Best Practices to Trim Your WordPress Database - Hongkiat","description":"A clean WordPress installation starts with 12 database tables by default, however, with time, data quickly adds up. Your numerous posts, pages, comments,","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:\/\/www.hongkiat.com\/blog\/trimming-wordpress-database\/","og_locale":"en_US","og_type":"article","og_title":"Best Practices to Trim Your WordPress Database","og_description":"A clean WordPress installation starts with 12 database tables by default, however, with time, data quickly adds up. Your numerous posts, pages, comments,","og_url":"https:\/\/www.hongkiat.com\/blog\/trimming-wordpress-database\/","og_site_name":"Hongkiat","article_publisher":"https:\/\/www.facebook.com\/hongkiatcom","article_published_time":"2017-05-29T15:01:39+00:00","article_modified_time":"2022-10-18T12:12:18+00:00","og_image":[{"url":"https:\/\/assets.hongkiat.com\/uploads\/trimming-wordpress-database\/wp-database.jpg","type":"","width":"","height":""}],"author":"Anna Monus","twitter_card":"summary_large_image","twitter_creator":"@hongkiat","twitter_site":"@hongkiat","twitter_misc":{"Written by":"Anna Monus","Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.hongkiat.com\/blog\/trimming-wordpress-database\/#article","isPartOf":{"@id":"https:\/\/www.hongkiat.com\/blog\/trimming-wordpress-database\/"},"author":{"name":"Anna Monus","@id":"https:\/\/www.hongkiat.com\/blog\/#\/schema\/person\/a601053a0ab457901e00cdc83bd5359e"},"headline":"Best Practices to Trim Your WordPress Database","datePublished":"2017-05-29T15:01:39+00:00","dateModified":"2022-10-18T12:12:18+00:00","mainEntityOfPage":{"@id":"https:\/\/www.hongkiat.com\/blog\/trimming-wordpress-database\/"},"wordCount":1091,"commentCount":3,"publisher":{"@id":"https:\/\/www.hongkiat.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.hongkiat.com\/blog\/trimming-wordpress-database\/#primaryimage"},"thumbnailUrl":"https:\/\/assets.hongkiat.com\/uploads\/trimming-wordpress-database\/wp-database.jpg","keywords":["ad-divi","wordpress optimization","WordPress Tips"],"articleSection":["WordPress"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.hongkiat.com\/blog\/trimming-wordpress-database\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.hongkiat.com\/blog\/trimming-wordpress-database\/","url":"https:\/\/www.hongkiat.com\/blog\/trimming-wordpress-database\/","name":"Best Practices to Trim Your WordPress Database - Hongkiat","isPartOf":{"@id":"https:\/\/www.hongkiat.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.hongkiat.com\/blog\/trimming-wordpress-database\/#primaryimage"},"image":{"@id":"https:\/\/www.hongkiat.com\/blog\/trimming-wordpress-database\/#primaryimage"},"thumbnailUrl":"https:\/\/assets.hongkiat.com\/uploads\/trimming-wordpress-database\/wp-database.jpg","datePublished":"2017-05-29T15:01:39+00:00","dateModified":"2022-10-18T12:12:18+00:00","description":"A clean WordPress installation starts with 12 database tables by default, however, with time, data quickly adds up. Your numerous posts, pages, comments,","breadcrumb":{"@id":"https:\/\/www.hongkiat.com\/blog\/trimming-wordpress-database\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.hongkiat.com\/blog\/trimming-wordpress-database\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.hongkiat.com\/blog\/trimming-wordpress-database\/#primaryimage","url":"https:\/\/assets.hongkiat.com\/uploads\/trimming-wordpress-database\/wp-database.jpg","contentUrl":"https:\/\/assets.hongkiat.com\/uploads\/trimming-wordpress-database\/wp-database.jpg"},{"@type":"BreadcrumbList","@id":"https:\/\/www.hongkiat.com\/blog\/trimming-wordpress-database\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.hongkiat.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Best Practices to Trim Your WordPress Database"}]},{"@type":"WebSite","@id":"https:\/\/www.hongkiat.com\/blog\/#website","url":"https:\/\/www.hongkiat.com\/blog\/","name":"Hongkiat","description":"Tech and Design Tips","publisher":{"@id":"https:\/\/www.hongkiat.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.hongkiat.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.hongkiat.com\/blog\/#organization","name":"Hongkiat.com","url":"https:\/\/www.hongkiat.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.hongkiat.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.hongkiat.com\/blog\/wp-content\/uploads\/hkdc-logo-rect-yoast.jpg","contentUrl":"https:\/\/www.hongkiat.com\/blog\/wp-content\/uploads\/hkdc-logo-rect-yoast.jpg","width":1200,"height":799,"caption":"Hongkiat.com"},"image":{"@id":"https:\/\/www.hongkiat.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/hongkiatcom","https:\/\/x.com\/hongkiat","https:\/\/www.pinterest.com\/hongkiat\/"]},{"@type":"Person","@id":"https:\/\/www.hongkiat.com\/blog\/#\/schema\/person\/a601053a0ab457901e00cdc83bd5359e","name":"Anna Monus","description":"Anna is Technical Editor and Writer for Hongkiat.com. She mainly covers front-end frameworks, web standards, accessibility, WordPress development, and UX design.","sameAs":["https:\/\/www.annalytic.com\/"],"url":"https:\/\/www.hongkiat.com\/blog\/author\/anna_monus\/"}]}},"jetpack_featured_media_url":"https:\/\/","jetpack_shortlink":"https:\/\/wp.me\/p4uxU-7Pd","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/posts\/30083","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/users\/146"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/comments?post=30083"}],"version-history":[{"count":3,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/posts\/30083\/revisions"}],"predecessor-version":[{"id":63051,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/posts\/30083\/revisions\/63051"}],"wp:attachment":[{"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/media?parent=30083"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/categories?post=30083"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/tags?post=30083"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/topic?post=30083"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}