Check Databases and Optimize or Repair as required

Your Website Maintenance toolkit should include Optimize and Repair of your databaseYour WordPress site uses a database to store all the text and formatting of your posts and pages. It also stores information temporarily as your visitors use the site to make their experience better. Maintenance of this database is sometimes overlooked.

This article is part of a series on regular website maintenance that you can do yourself.

Over time the adding and removing and updating of this database leads to blank spaces and holes that make the database less efficient. It is a little bit like when the disk drive on your computer becomes fragmented. On a small site with little traffic you may not notice but on larger sites it can make a difference.

There is a database feature called optimize. It will optimize the database to remove spaces and will make sure that the indexes and other internal structures of the database are as efficient as can be.

How to perform optimization of your database

You have a number of choices with how you optimize the database tables, you can do it manually, use a plug-in to help you do it manually, or have a plug-in do it for you automatically. I tend to use option 1 and 3 from the list below.

1. Use myPHPAdmin allows you to optimize tables

  • Log onto myPHPAdmin through your hosting provider, look at the database and you will see any tables that need optimization
  • Select them and choose optimizeThe optimize screen in myPHPAdmin

2. Use a database plug-in to do this for you

If you can’t log onto myPHPAdmin then you will need a plug-in to help.

There are many plug-ins that will allow you to optimize your database (and other entries). Have a look at the list available from this simple search on the word Optimize. I don’t use these plug-ins myself and you should take care when selecting a plug-in that it does what you want, has good support, and is well reviewed and maintained

3. Use a database / backup plug-in to do this automatically.

Perhaps the easiest is to a  plug-in to do perform optimization automatically on a regular basis. A good example of this is backWPup. It will perform backups at regular intervals of files, databases, or other database maintenance options.

Whichever way you do this I suggest checking the optimization of your database at regular intervals.  You have probably noticed this about me. I tend to automate as much as possible but you have to take responsibility for making sure that what you have automated is still working from time to time.

Check my website maintenance summary page for other articles and ideas on keeping your website safe and secure.