Optimize wordpress DB
Having experience that your blog is slowing down while network connection is in normal state? Well, that could be caused by several factor. It could be caused by network slowing down on your blog server, or you're accessing your blog in the peak time. If what I stated above is not the problem, maybe you want to check your database. Because it happen every time that after a few month, we usually receive much spam. Take this blog as an example, for the past 15 days, I have received around 1670 spam. Well, this isn't really true because many more is automatically deleted by akismet after 15 days. But this latest spam has occupy around 4.5 mb database space.
So how do we optimize it? if you are using mysql client to access your database, they usually have tools to do it. For example, if you use phpmyadmin, here's the step :
1. login to your phpmyadmin page
2. select your database
3. go to 'structure' tab
4. click 'check all' link under table list
5. now in 'with selected' combo box, select 'optimize table'
6. you should see some 'OK' or 'Table is already up to date' messages.
This mean our table is optimized.
How about if you don't have access to phpmyadmin or other software, but is able to access mysql command prompt? Well, you need to optimize your table manually by typing:
OPTIMIZE TABLE 'table_name_1', 'table_name_2', ...
If you don't want to go through all this pain, you can shorten your way by installing WP-DBManager. By using it, you just need to push 'optimize' under 'optimize DB' tab that appear after you install this plugin.
So, how much do you able to recover your space after optimizing it? I'm able to take back by space from those pesky spam in approximately 4.2 MB. I don't know why the result is different from my mysqldump result.









Pingback: Elliott Back