• Skip to main content
  • Skip to primary sidebar
  • Home
  • WordPress
  • web Hosting
  • linux
  • mysql
  • nginx
  • apache2
  • devops

Raju Ginni

wordpress tutorials seo hosting etc

You are here: Home / wordpress tutorials for beginners advanced complete guide to run WordPress / WordPress database optimization (don’t neglect) plugins & phpmyadmin manually

WordPress database optimization (don’t neglect) plugins & phpmyadmin manually

 

automatic or manual optimization

we are humans more chances are there to foregetting, neglecting, overloading our mind other thoughts

I simple neglecting cause ms latency tend to loose million dollars ft amazon, google etc.

Table of Contents

Toggle
  • Delete unsued tables in wordpress database why?
  • WordPress database optimization plugins
    • Wp rocket vs wp-optimize
  • Wp rocket database optimization settings
  • wordpress database optimization with phpmyadmin
  • Why reducing database boosts performance
    • deleting wordpress post meta with phpmyadmin
  • bulk delete wordpress comments pending & spam phpmyadmin
    • post revisions
    • Expired Transients
  • deleting tables of uninstalled plugins
    • optimize database tables
    • delete spam comments

Delete unsued tables in wordpress database why?

evry DB connection searches whole database, and memory cahche also store unnecessary tables. its better to smaller databse.

so i am here using wp-optimize to identify unused tables which are 200+ caused by 10+ mulisite installations which are deleted but tables still there. and wp admin slow after domain change. caching issues etc.

 

litspeed cache demo

wordpress db optimization litespeed cache

WordPress database optimization plugins

Wp rocket vs wp-optimize

wp optimize introduced page cache, minify css&js judt like other caching plugins.
why?  maybe wp  rocket introduced db optimization along with page caching.

Wp rocket database optimization settings

clean expired transcients
clean post auto revisions (you can limit post revisions in wp config php)
optimize tables
delete auto draft a
Empty trash comments
wp optimize has better feature viewing tables just like in phpmyadmin.
deleting tables that are left by uninstalled plugins.
both plugins have weekly automatic cleanup & optimize settings.

wordpress database optimization with phpmyadmin

some plugins like all in one wp security, redirection manager, etc
Leaves logs in database tables.
ex: ip login licked table has 10000 rows, but posts table has only 100 rows.

Why reducing database boosts performance

Reason: innodb buffer pool caching database in memory.
so we allocate less memory that means lower costs & higher performance.
object caching redis / memcached also requires memory.
Myisam locks entire table while a query performing new queries has to wait.
Innodb locks at row level ,
logging to database also cause iops issues tend lower performance.
why need phpmyadmin to empty the data of table.

deleting wordpress post meta with phpmyadmin

(don’t play with database)leave it if not necessary.
or take backup must otherwise you regret in case something goes wrong.
why post meta rows higher than posts.
yoast seo meta, review schema, job schema, author schema,
each plugin adds meta data about your posts.
this is the reason post meta has higher rows.
delete the post meta for unused plugins.
1st check the plugin.
SELECT * FROM wp_postmeta WHERE `meta_key` LIKE ‘%smpro%’
DELETE FROM `wp_postmeta` WHERE `meta_key` LIKE ‘%review%’;
or
SELECT * FROM wp_postmeta pm LEFT JOIN wp_posts wp ON wp.ID = pm.post_id WHERE wp.ID IS NULL;
DELETE pm FROM wp_postmeta pm LEFT JOIN wp_posts wp ON wp.ID = pm.post_id WHERE wp.ID IS NULL;
SELECT * FROM your_prefix_postmeta pm LEFT JOIN your_prefix_posts wp ON wp.ID = pm.post_id WHERE wp.ID IS NULL; DELETE pm FROM wp_postmeta pm LEFT JOIN your_prefix__posts wp ON wp.ID = pm.post_id WHERE wp.ID IS NULL;
or
SELECT * FROM your_prefixcommentmeta WHERE comment_id NOT IN ( SELECT comment_id FROM your_prefix_comments ); DELETE FROM your_prefix_commentmeta WHERE comment_id NOT IN ( SELECT comment_id FROM your_prefix_comments ); SELECT * FROM your_prefix_commentmeta WHERE meta_key LIKE ‘%akismet%’; DELETE FROM your_prefix_commentmeta WHERE meta_key LIKE ‘%akismet%’;

bulk delete wordpress comments pending & spam phpmyadmin

DELETE FROM wp_comments WHERE comment_approved = ‘spam’;
DELETE FROM wp_comments WHERE comment_approved = ‘pending’;
transients
are used to communicate, expired transcients not automatically deleted themselves, we need to delete them manually.
delete unused tables
Phpmyadmin select table.
and drop.

post revisions

define( ‘WP_POST_REVISIONS’, 3)
clean all post revisions after certain time.
it’s better install a db optimize plugin.
old databases gets worse without optimizing it.
  • Carries out automatic weekly (or otherwise) clean-ups

Expired Transients

Wp-optimize
optimizing through phpmyadmin

deleting tables of uninstalled plugins

wordpress only have 11 core tables.
Innodb table locks row while mousam locks table while mysql queries.
whole database has to cache inorder to read lower size database Higher speed.

optimize database tables

optim

delete spam comments

we need to define spam triggers , so comments go straight to spam folder.
DELETE FROM wp_comments WHERE comment_approved = ‘spam’;
If you are DBA or db admin you may run SQL commands in terminal
like optimize, repair, other tools & scripts helpful
optimizing queries etc.
read MySQL optimization & MySQL performance tuning
tools do better & error free cleaning rather manualy doing it.(higher chances forgetting)

Primary Sidebar

wordpress tutorials for beginners advanced complete guide to run WordPress

  • wordpress speed optimization Speed up wordpress Score on Google pagespeed
  • best wordpress plugins social, seo, Backup, speed up your blog
  • TOP 10 Wordpress Themes Premium/ Free & providers
  • Wordpress Adsense Plugins & Manually
  • Social share buttons for website Wordpress Blogger
  • How to bulk delete in wordpress posts, pages, Media Images, tags and categories
  • TOP 5 Best wordpress comment plugins 2020 (disable pingback, replytocom, customize form)
  • all in one seo pack vs yoast seo pressor
  • Auto post to Facebook, twitter, Google Plus Wordpress Posts 2019
  • wordpress plugins that slow down your site and its alternatives
  • How to use wordpress tags and categories
  • Wordpress duplicate thin content Issues {FIXED}
  • how to increase wordpress memory & file upload size
  • combine rss feeds wordpress
  • Reduce the impact of third-party code ,optimize JS delivery, Minify, remove unused js, pre connect, inline, lazy load etc
  • change wordpress site url internal links in mysql command phpmyadmin
  • install wordpress on ubuntu nginx lemp command line apache debian
  • Wordpress Security Plugins 2021 (Brute force, Login lockdown, Malware scanner etc)
  • website cache best caching plugins wordpress w3tc cloudflare
  • How to add adsense amp ads to wordpress
  • wordpress password reset in 3 ways mail, phpmyadmin, mysql command
  • how i recovered hacked website site 5 times ft wordpress?
  • wordpress redirection examples Rankmath seo
  • enable browser caching in wordpress apache nginx caching headers explained
  • W3TC w3 total cache plugin setup guide review comparison with wp rocket and wp super cache
  • Wordpress database optimization (don't neglect) plugins & phpmyadmin manually
  • Optimize css delivery inline critical css, remove unused css, render blocking css
  • Converting WordPress into static website speed after 1 second dynamic 3 seconds
  • Wordpress errors and fix
  • Rules to get 100/100 in Google pagespeed web core vitalsscore
  • Install xamp & wordpress on localhost windows
  • favicon ico Change / Add / Disable favicon in wordpress Ft Genesis Theme or any theme
  • increase wordpress memory limit (how to ) 40MB , 64 MB 128 MB or 512 MB maybe 1024MB
  • wp cron job check working or not disable enable change schedule
  • google analytics plugins for wordpress #sitekit #monsterinsights gadwp back as gainwp
  • Lazy Load Adsense to improve core web vitals - Vs revenue
  • xmlrpc php wordpress uses, disable without 403 error log message
  • wordpress 304 header implement using plugin
  • wordpress change post date programmatically (auto on update like blogger
  • sorry you are not allowed to access this page. admin WordPress options table
  • clone wordpress in linux ubuntu server lemp nginx
  • Cloudflare cache rules for WordPress along with page rules cache level everything
  • wordfence-waf.php fatal error fixed after migration
  • Cloudflare page rules cache level everything redirect and sub domain
  • wordpress delete all posts from database mysql query for phpmyadmin
  • php fpm oom killer problem how to dig it.. memory pool and execution time
  • nginx wordpress multisite subdirectory multiple domains
  • Helpful Content update recovery Trying to dig it
  • How to Move a Single WordPress Site into a Multisite
  • Enable multisite in wordpress in 3 steps problems datbase error
  • Seprate single site from wordpress multisite domain based
  • Error establishing a database connection wordpress multisite
  • Add single wordpress to MultiSite wordpress
  • genesis theme cateogory customization examples
  • could not insert term into the database. wordpress
  • wordpress breadcrumbs not showing full path
  • There has been a critical error on this website fed up
  • Site structure WP categories vs sub pages or multisite posts or pages
  • WordPress pyramid structure Permalinks Category vs sub pages vs multisite

hi i am raju ginni, primalry i manage wordpress websites on GCP cloud platform as a cloud engineer, and create content on passionate things.
you can follow me on youtbe

© 2025 - All Rights Reserved Disclaimer & Privacy Policy