{"id":157,"date":"2011-12-09T08:00:10","date_gmt":"2011-12-09T08:00:10","guid":{"rendered":"http:\/\/pixert.com\/blog\/?p=157"},"modified":"2011-12-08T10:09:42","modified_gmt":"2011-12-08T10:09:42","slug":"wordpress-database-optimization","status":"publish","type":"post","link":"https:\/\/pixert.com\/blog\/wordpress-database-optimization\/","title":{"rendered":"WordPress Database Optimization"},"content":{"rendered":"<p><a href=\"https:\/\/i0.wp.com\/pixert.com\/blog\/wp-content\/uploads\/2011\/03\/wordpresslogo.png\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"25\" data-permalink=\"https:\/\/pixert.com\/blog\/how-to-upgrade-wordpress\/wordpresslogo\/\" data-orig-file=\"https:\/\/i0.wp.com\/pixert.com\/blog\/wp-content\/uploads\/2011\/03\/wordpresslogo.png?fit=498%2C113&amp;ssl=1\" data-orig-size=\"498,113\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}\" data-image-title=\"WordPress &#8211; the logo\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/i0.wp.com\/pixert.com\/blog\/wp-content\/uploads\/2011\/03\/wordpresslogo.png?fit=300%2C68&amp;ssl=1\" data-large-file=\"https:\/\/i0.wp.com\/pixert.com\/blog\/wp-content\/uploads\/2011\/03\/wordpresslogo.png?fit=498%2C113&amp;ssl=1\" class=\"aligncenter size-medium wp-image-25\" title=\"WordPress - the logo\" src=\"https:\/\/i0.wp.com\/pixert.com\/blog\/wp-content\/uploads\/2011\/03\/wordpresslogo-300x68.png?resize=300%2C68\" alt=\"\" width=\"300\" height=\"68\" srcset=\"https:\/\/i0.wp.com\/pixert.com\/blog\/wp-content\/uploads\/2011\/03\/wordpresslogo.png?resize=300%2C68&amp;ssl=1 300w, https:\/\/i0.wp.com\/pixert.com\/blog\/wp-content\/uploads\/2011\/03\/wordpresslogo.png?w=498&amp;ssl=1 498w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>WordPress is powered by PHP and depends on MySQL database; in fact, all the content, including the website settings, are stored in it. When your WordPress site is visited, the web server will query the database to retrieve all the necessary information to display. However, over time, the speed required for querying the database will increase due to the number of operations such as <strong>insert, updates, and \u00a0delete of data entries<\/strong>.<\/p>\n<p>From time to time it is a good idea to do a little housekeeping with your WordPress installation. \u00a0MySQL databases don\u2019t clean themselves, it will help to free up disk space and keep your database running smoothly.<\/p>\n<p>As a start, try optimizing the overheads on your database as reported in phpMyAdmin. When this occurs, you need to run <strong>Optimize Table<\/strong> manually via WP Optimize plugin or phpMyAdmin<\/p>\n<p><strong>Warning<\/strong>: backup the WordPress database before\u00a0making major optimization efforts<\/p>\n<p><strong>1. WP Optimize Plugin<\/strong><\/p>\n<p>If you\u2019re not familiar with phpMyAdmin, then a WordPress plugin may be a safer option for you. \u00a0Those plugins will allow you to select the tables you wish to optimize and will also show you the total size of your database and how much of it can be reduced after you have completed the optimization.<\/p>\n<p><a href=\"http:\/\/wordpress.org\/extend\/plugins\/wp-optimize\/\" target=\"_blank\">WP-Optimize<\/a>: This is a database cleanup and optimization tool.It does all of this without the use of <a href=\"http:\/\/www.phpmyadmin.net\/home_page\/index.php\" target=\"_blank\">phpMyAdmin<\/a> (a program used to handle the administration of your MySQL servers). It will show you which tables are already optimized and the ones that need to be optimized. Select the option: \u00a0Optimize database tables. Then click the Process button below the option<\/p>\n<figure id=\"attachment_172\" aria-describedby=\"caption-attachment-172\" style=\"width: 300px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/i0.wp.com\/pixert.com\/blog\/wp-content\/uploads\/2011\/12\/wpoptimize.jpg\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"172\" data-permalink=\"https:\/\/pixert.com\/blog\/wordpress-database-optimization\/wpoptimize\/\" data-orig-file=\"https:\/\/i0.wp.com\/pixert.com\/blog\/wp-content\/uploads\/2011\/12\/wpoptimize.jpg?fit=1009%2C895&amp;ssl=1\" data-orig-size=\"1009,895\" data-comments-opened=\"0\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}\" data-image-title=\"WP Optimize\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/i0.wp.com\/pixert.com\/blog\/wp-content\/uploads\/2011\/12\/wpoptimize.jpg?fit=300%2C266&amp;ssl=1\" data-large-file=\"https:\/\/i0.wp.com\/pixert.com\/blog\/wp-content\/uploads\/2011\/12\/wpoptimize.jpg?fit=1009%2C895&amp;ssl=1\" class=\"size-medium wp-image-172\" style=\"border-width: 1px; border-color: black; border-style: solid;\" title=\"WP Optimize\" src=\"https:\/\/i0.wp.com\/pixert.com\/blog\/wp-content\/uploads\/2011\/12\/wpoptimize-300x266.jpg?resize=300%2C266\" alt=\"\" width=\"300\" height=\"266\" srcset=\"https:\/\/i0.wp.com\/pixert.com\/blog\/wp-content\/uploads\/2011\/12\/wpoptimize.jpg?resize=300%2C266&amp;ssl=1 300w, https:\/\/i0.wp.com\/pixert.com\/blog\/wp-content\/uploads\/2011\/12\/wpoptimize.jpg?w=1009&amp;ssl=1 1009w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><figcaption id=\"caption-attachment-172\" class=\"wp-caption-text\">WP Optimize plugin (click to see the screenshot)<\/figcaption><\/figure>\n<p><strong>2. phpMyAdmin<\/strong><br \/>\nIf you have access to phpMyAdmin, simply login to your phpMyAdmin and select the option <strong>1: Check tables having overhead <\/strong>. Then at the side in the drop down box, select <strong>2: Optimize Table,\u00a0<\/strong>\u00a0this will take care of all of your tables at once.<\/p>\n<figure id=\"attachment_173\" aria-describedby=\"caption-attachment-173\" style=\"width: 300px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/i0.wp.com\/pixert.com\/blog\/wp-content\/uploads\/2011\/12\/phpmyadminoptimize.jpg\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"173\" data-permalink=\"https:\/\/pixert.com\/blog\/wordpress-database-optimization\/phpmyadminoptimize\/\" data-orig-file=\"https:\/\/i0.wp.com\/pixert.com\/blog\/wp-content\/uploads\/2011\/12\/phpmyadminoptimize.jpg?fit=1062%2C611&amp;ssl=1\" data-orig-size=\"1062,611\" data-comments-opened=\"0\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}\" data-image-title=\"phpMyAdmin Optimization\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/i0.wp.com\/pixert.com\/blog\/wp-content\/uploads\/2011\/12\/phpmyadminoptimize.jpg?fit=300%2C172&amp;ssl=1\" data-large-file=\"https:\/\/i0.wp.com\/pixert.com\/blog\/wp-content\/uploads\/2011\/12\/phpmyadminoptimize.jpg?fit=1024%2C589&amp;ssl=1\" class=\"size-medium wp-image-173 \" style=\"border-width: 1px; border-color: black; border-style: solid;\" title=\"phpMyAdmin Optimization\" src=\"https:\/\/i0.wp.com\/pixert.com\/blog\/wp-content\/uploads\/2011\/12\/phpmyadminoptimize-300x172.jpg?resize=300%2C172\" alt=\"\" width=\"300\" height=\"172\" srcset=\"https:\/\/i0.wp.com\/pixert.com\/blog\/wp-content\/uploads\/2011\/12\/phpmyadminoptimize.jpg?resize=300%2C172&amp;ssl=1 300w, https:\/\/i0.wp.com\/pixert.com\/blog\/wp-content\/uploads\/2011\/12\/phpmyadminoptimize.jpg?resize=1024%2C589&amp;ssl=1 1024w, https:\/\/i0.wp.com\/pixert.com\/blog\/wp-content\/uploads\/2011\/12\/phpmyadminoptimize.jpg?w=1062&amp;ssl=1 1062w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><figcaption id=\"caption-attachment-173\" class=\"wp-caption-text\">Optimize tables with phpMyAdmin (click to see the screenshot)<\/figcaption><\/figure>\n<p style=\"text-align: center;\">\n","protected":false},"excerpt":{"rendered":"<p>WordPress is powered by PHP and depends on MySQL database; in fact, all the content, including the website settings, are stored in it. When your WordPress site is visited, the web server will query the database to retrieve all the necessary information to display. However, over time, the speed required for querying the database will [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":172,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[8,13,5],"tags":[9,15,28,69,6,66,7],"class_list":["post-157","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-centos","category-cpanel","category-wordpress","tag-centos-2","tag-cpanel-2","tag-mysql","tag-phpmyadmin","tag-wordpress-2","tag-wordpress-plugin","tag-wp"],"aioseo_notices":[],"jetpack_featured_media_url":"https:\/\/i0.wp.com\/pixert.com\/blog\/wp-content\/uploads\/2011\/12\/wpoptimize.jpg?fit=1009%2C895&ssl=1","jetpack_shortlink":"https:\/\/wp.me\/p1pvi1-2x","jetpack-related-posts":[{"id":170,"url":"https:\/\/pixert.com\/blog\/repair-wordpress-database\/","url_meta":{"origin":157,"position":0},"title":"Repair WordPress Database","author":"Pixel Insert \/ Pixert","date":"December 10, 2011","format":false,"excerpt":"When a WordPress table crash, one symptom might be that all of your posts seem to have disappeared, or perhaps all of your drafts. You may even get a message in phpMyAdmin telling you that one of your tables haves crashed. No need to worry. Repairing tables is very easy.\u2026","rel":"","context":"In &quot;CentOS&quot;","block_context":{"text":"CentOS","link":"https:\/\/pixert.com\/blog\/category\/centos\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/pixert.com\/blog\/wp-content\/uploads\/2011\/12\/phpmyadminrepair.jpg?fit=1064%2C640&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/pixert.com\/blog\/wp-content\/uploads\/2011\/12\/phpmyadminrepair.jpg?fit=1064%2C640&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/pixert.com\/blog\/wp-content\/uploads\/2011\/12\/phpmyadminrepair.jpg?fit=1064%2C640&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/pixert.com\/blog\/wp-content\/uploads\/2011\/12\/phpmyadminrepair.jpg?fit=1064%2C640&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/pixert.com\/blog\/wp-content\/uploads\/2011\/12\/phpmyadminrepair.jpg?fit=1064%2C640&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":98,"url":"https:\/\/pixert.com\/blog\/wordpress-which-privileges-are-needed-by-mysql-database-user\/","url_meta":{"origin":157,"position":1},"title":"WordPress: Which privileges are needed by MySQL Database User","author":"Pixel Insert \/ Pixert","date":"May 2, 2011","format":false,"excerpt":"The famous 5 minutes installation for WordPress state that: Create a database for WordPress on your web server, as well as a MySQL user who has all privileges for accessing and modifying it Most installation instruction for WordPress on the web state that you can GRANT ALL PRIVILEGES to that\u2026","rel":"","context":"In &quot;cPanel&quot;","block_context":{"text":"cPanel","link":"https:\/\/pixert.com\/blog\/category\/cpanel\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/pixert.com\/blog\/wp-content\/uploads\/2011\/05\/mysqlwp.jpg?fit=523%2C368&ssl=1&resize=350%2C200","width":350,"height":200},"classes":[]},{"id":201,"url":"https:\/\/pixert.com\/blog\/remove-wordpress-revisions\/","url_meta":{"origin":157,"position":2},"title":"Remove WordPress Revisions","author":"Pixel Insert \/ Pixert","date":"February 16, 2012","format":false,"excerpt":"WordPress Posts Revisions are useful especially in the case of a multi author blog. However, There is a cost to having all these saved revisions of your posts in the aspect of database entries. Instead of having a single MySQL database record for your post you will have multiple records\u2026","rel":"","context":"In &quot;WordPress&quot;","block_context":{"text":"WordPress","link":"https:\/\/pixert.com\/blog\/category\/wordpress\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/pixert.com\/blog\/wp-content\/uploads\/2011\/03\/wordpresslogo-300x68.png?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":198,"url":"https:\/\/pixert.com\/blog\/the-basic-of-wordpress-post-revisions\/","url_meta":{"origin":157,"position":3},"title":"The Basic of WordPress Post Revisions","author":"Pixel Insert \/ Pixert","date":"February 12, 2012","format":false,"excerpt":"WordPress has built in feature that automatically saves versions or revisions of your posts as you edit and create them. WordPress, by default, will save copies of each edit made to a post or page, allowing the possibility of reverting to a previous version of that post or page. The\u2026","rel":"","context":"In &quot;WordPress&quot;","block_context":{"text":"WordPress","link":"https:\/\/pixert.com\/blog\/category\/wordpress\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/pixert.com\/blog\/wp-content\/uploads\/2011\/03\/wordpresslogo-300x68.png?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":166,"url":"https:\/\/pixert.com\/blog\/output-the-number-of-wordpress-database-queries\/","url_meta":{"origin":157,"position":4},"title":"Output the number of WordPress Database Queries","author":"Pixel Insert \/ Pixert","date":"December 8, 2011","format":false,"excerpt":"The number of database queries a webpage makes to load the page have an effect on the page load time. You can use the following piece of code in the footer of your theme to find out how many database queries a page is making or WordPress query outputs and\u2026","rel":"","context":"In &quot;WordPress&quot;","block_context":{"text":"WordPress","link":"https:\/\/pixert.com\/blog\/category\/wordpress\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/pixert.com\/blog\/wp-content\/uploads\/2011\/03\/wordpresslogo-300x68.png?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":22,"url":"https:\/\/pixert.com\/blog\/how-to-upgrade-wordpress\/","url_meta":{"origin":157,"position":5},"title":"How to Upgrade WordPress","author":"Pixel Insert \/ Pixert","date":"March 6, 2011","format":false,"excerpt":"A few steps to upgrade WordPress 1. Backup WordPress database with phpmyadmin or WordPress Database Backup plugin 2. Deactivate any plugins 3. Delete files and folders, except wp-config.php files and wp-content folder 4. Upload the latest WordPress, except wp-config.php files and wp-content folder 5. Type in domain_name\/wp-admin\/upgrade.php\u00a0 or domain_name\/wp-admin on\u2026","rel":"","context":"In &quot;WordPress&quot;","block_context":{"text":"WordPress","link":"https:\/\/pixert.com\/blog\/category\/wordpress\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/pixert.com\/blog\/wp-content\/uploads\/2011\/03\/wordpresslogo-300x68.png?resize=350%2C200","width":350,"height":200},"classes":[]}],"jetpack_sharing_enabled":true,"jetpack_likes_enabled":true,"_links":{"self":[{"href":"https:\/\/pixert.com\/blog\/wp-json\/wp\/v2\/posts\/157","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pixert.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/pixert.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/pixert.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/pixert.com\/blog\/wp-json\/wp\/v2\/comments?post=157"}],"version-history":[{"count":0,"href":"https:\/\/pixert.com\/blog\/wp-json\/wp\/v2\/posts\/157\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/pixert.com\/blog\/wp-json\/wp\/v2\/media\/172"}],"wp:attachment":[{"href":"https:\/\/pixert.com\/blog\/wp-json\/wp\/v2\/media?parent=157"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pixert.com\/blog\/wp-json\/wp\/v2\/categories?post=157"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pixert.com\/blog\/wp-json\/wp\/v2\/tags?post=157"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}