How To Further Optimize Your Database Tables Using Some Quick Queries:
To further optimize your Database, you can also delete manually some elements that over time, make your database larger and less manipulative without any specific reason.
So you can delete:
- Pingbacks
- Unused Tags
- Spam Comments
To run the queries listed below, you need to log in to your phpMyAdmin and then click the database of your website from the left column. From the tabs displayed on top, click on SQL and then use the empty space provided to copy/paste the below queries.
So, to delete all Pingbacks:DELETE FROM wp_comments WHERE comment_type = 'pingback';
When you copy/paste this on the empty space then click the Go button.
To delete Unused Tags:SELECT * From wp_terms wt INNER JOIN wp_term_taxonomy wtt ON wt.term_id=wtt.term_id WHERE wtt.taxonomy='post_tag' AND wtt.count=0;
To delete Spam Comments:DELETE from wp_comments WHERE comment_approved = '0'LETE from wp_1_comments WHERE comment_approved = '0'
That's it! Now you have removed all this unnecessary space, and you have optimized your database for better performance and speed.
Join the Discussion
Write something…
Pobman
Premium
I would not suggest most people run with W3 Total Cache, unless your server is setup right you will not see all the improvements from this plugin and you can actually make things worse. If you install it and you only have options for Disk caching, i.e. no APC etc. then I would just jump ship to Super Cache which pretty much works out of the box.
Running with the CDN though is a massive improvement for most people, I now run most sites with static content on cloudfront and the difference is out of this world.
FYI Cloudfront have added Sydney Australia to their CDN... makes them a winner in my book!
Nice guide though.
Running with the CDN though is a massive improvement for most people, I now run most sites with static content on cloudfront and the difference is out of this world.
FYI Cloudfront have added Sydney Australia to their CDN... makes them a winner in my book!
Nice guide though.
Denisara
Premium
smush it doesnt appear to work. it does nothing if I 'mass smush' and if I do them one at a time (and I have 364 pics) it times out. any suggestions? here is the error message I am getting: Automatic smushing has been disabled temporarily due to an error. Operation timed out after 20071 milliseconds with 0 bytes received
i tried a few more pics to "smush" and now they show up "BLANK" how do i get them back? this does NOT work
case in point:
http://bonestrivia.com/bones-season-eight-begins/bones-season-eight
this is one pic "smushed" out of about 12 that i tried this on. how do you reverse this ??????
i guess i have to redo that work completely if I want pictures to show UP
i tried a few more pics to "smush" and now they show up "BLANK" how do i get them back? this does NOT work
case in point:
http://bonestrivia.com/bones-season-eight-begins/bones-season-eight
this is one pic "smushed" out of about 12 that i tried this on. how do you reverse this ??????
i guess i have to redo that work completely if I want pictures to show UP
Denisara
Premium
funny, I was told that W3 Total Cache is a mistake to use unless you get like over 10k visitors per month by either Jay, Kyle or Carson...among others. The rest of what you say to do does not make sense to a newb such as myself but thanks for the article...maybe it will help someone else
morlandroger
Premium
WOW this is very comprehensive! Will come back to it and look at some of my sites again with a view to speeding up load times. Thanks for this