When I first began to host my own blogs, learning about FTP and phpMyAdmin, I was extremely intimidated. But I am more comfortable tinkering in the database files, and have discovered how powerful the phpMyAdmin software truly is.
It is important, if you are going to be a blog owner hosting your websites on your own domains, that you learn how to manage your databases. A database is, simply, is a structured collection of data that is stored in a computer system. Your blog uses something called an “SQL database.” It is important to know how your databases are organized and how they work. This will greatly reduce the agonies and sufferings (and they are SURE to come) of database problems and other issues. In this post, I’m going to show you how to repair and optimize your databases using phpMyAdmin.
Older blogs with numerous posts and comments tend to show their age after time. Coding and other information gets scrambled or confused, or sometimes the server has to work very hard to locate specific files and such. It helps greatly to repair and optimize databases. This is especially helpful when your blog “goes down” (aka, crashes faster than compact flash) frequently for no good reason. Try repairing the database. It’s not hard; here’s how to go about it:
Log in to your web host’s cPanel using the username and password you made when starting the account. Once you are on the home page of your cPanel, scroll down to “Databases.” Look for “phpMyAdmin.” The screenshots are from my own account with Hostgator. Hostgator’s cPanel is much like Bluehost.
So, once you choose phpMyAdmin, a new window (or tab) should appear. phpMyAdmin is an extremely powerful and useful software program that manages databases. Once you have accessed phpMyAdmin, you’ll see to the left a column listing your databases. I have six databases on this web host, so there are six in the column. (I scratched out the names to keep hackers at bay).
Choose the database you want to work with by clicking on the name. When you do, a table will appear in the left-hand side and right-hand side of the software. The left-hand side shows the tables in your database in a list. The right-hand side shows them but also gives you a platform with which to work with the tables. We’re going to move our attention to the right-hand, wider side of the screen. Here’s a snippet of what you will see.
These are the tables for your database to your blog. Some things may look familiar, like active plugins, comments on your blog, links, etc. We aren’t going to deal with individual files here– we are just going to repair all these files at once, and then optimize them. phpMyAdmin makes this easy.
You want to find the “Check All” feature, to select every table in the database. This feature is usually at the very bottom of the table. Click “Check All” and all the check boxes should show checkmarks in them.
Now, go to the drop down menu at the bottom of the databse table. Choose “REPAIR.” (Note: in the screenshot below, there are no checkmarks in my boxes because I forgot to “Check All” when I was making the screenshot for this blog post. Your own checkboxes should all have checkmarks in them when you chose “REPAIR.”)
When you let go of the mouse, the repair process will commence immediately and the page will reload. Don’t worry if everything disappears for a moment. It will come back with this message:
You can see the “repair” in the table above, and that everything went “OK.”
Now, go to the top of the database and look for “Structure.” This will take you back to the database table you saw right before you chose “REPAIR” from that drop-down menu. If you look in the above photo again, you’ll see “Structure” in the top left-hand area.
Once you are at the database table again, you want to “Check All” again. This time you are going to “OPTIMIZE” the database. This will organize the tables and information.
(Note: in the screenshot below, there are no checkmarks in my boxes because I forgot to “Check All” when I was making the screenshot for this blog post. Your own checkboxes should all have checkmarks in them when you chose “OPTIMIZE.”)
As with the “REPAIR” process, the page will reload and give you confirmation that the database has been optimized.
That’s it! You can use the column in the left-hand side to go to your other databases and repair/optimize them as well. When you are done, you can log off of phpMyAdmin by choosing the green square that says “EXIT.” This will log you out and you can close this window (or tab).
When you close out phpMyAdmin, you will notice that you are still in your cPanel. When you have finished things there (if you have anything else to do there), you can log off that, too.
Remember, it is helpful to repair and optimize your database from time to time, as it gets older. I have seen some geeks recommend transferring very old blog data into a totally new database and archiving it. Maybe we’ll get to that some other time.










February 19, 2009
blogs, how to, web hosting, Wordpress