One of the many open source tools that people use to create their website is WordPress. And since it is an open source, meaning thousands people use it every day and thousands of people upload blog posts, comments, pages and many types of media. As the number of these entries increase, the strain on the database used to store these entries also increases. The strain will then, eventually affect your website performance making it longer to access the required information from the database because of the many others in there. Hence, you must optimize your database. But how exactly will you do this? Stay tuned and you will find out.
What Is Inside Your Database?
Before proceeding into the methods you can use, here is an overview of what are the contents of your database. Knowing these contents, will give you an idea of what can be optimized or what can removed from your database.
Options (wp_options) – this stores the options in your admin settings area
Comments (wp_comments) – this stores the comments you received
Links (wp_links) – this stores the blogroll links
Posts (wp_posts) – this stores data for your pages, posts, and custom post
Terms (wp_terms) – this stores post and link tags and categories
Taxonomy (wp_term_taxonomy) – this stores the description of the taxonomy in your wp_terms table
User Meta (wp_usermeta) – this stores the Meta information of the users of your website
Users (wp_users) – this stores your user records
Comments Meta (wp_commentmeta) – this stores the Meta information of the comments you received in your posts
Post Meta (wp_postmeta) – this stores Meta information of your posts
Relationship (wp_term_relationships) – this stores the association or relationship that exists between your posts, categories and tags. This also stores the relationship of your links and link categories.
How Can You Optimize Your Database?
One of the easy ways that most WordPress web page owners use to cleanup and optimize their WordPress database us through the use of an optimization tool. One of the most popularly used tools for WordPress database optimization is the WP-Optimize.
You WP-Optimize exists as a plug-in to you WordPress, so to activate it as one. Just an important reminder though, if this will be your first time using this plug-in, it is highly recommended that you back-up your database first to avoid losing entries you do not want to lose permanently.
How Does WP-Optimize Work
Your WP-Optimize plug-in mainly functions to remove post revisions, remove spam, remove trashed comments, remove transient options, automatic cleanup of all your integrated options, apply the native MySql commands of your WordPress, display the statistics, enable exclusive administrator use only, and many more other things.
If you are not sure about an option in the plug-in only use those you know or ask someone who does.
How To Use The Plug-In
If you want to use the plug-in, first you have to have to check if you have the PHP 5.1.xx and the MySQL 5.1.xxx, a WordPress version of 3.8 (beta) and higher or the regular WordPress 3.x version and the higher ones.
To use the plug-in, you must first install it. To do so, go to your dashboard. In the menu at the left side, look for ‘Plugins. Under that, click ‘Add New’ and in the search box, type in WP-Optimize. Once you find the plug-in, install it by clicking ‘Install Now’. Once the installation is done, you will be able to see WP-Optimize at the left side of your dashboard, sometimes under the WP Admin.
To start with the optimization, click the WP-Optimize button. A pop-up or another page opens. From there select the options you want to perform under the ‘Clean-up options’ and ‘Actions’. Some versions of WP-Optimize open to ‘Database Optimization Options’ instead of the prior two options. Also, be weary of the options in red because they are the ones considered potentially dangerous when activated. So if you are not sure of what they can do, then do not put tick marks in them. If you are done choosing, click ‘Process’. The optimization will then start.
You can also set the plug-in to automatically optimize your database. To do this, open the WP-Optimize interface. Go to the ‘Settings’, at the right side you will ‘Auto Clean-up Settings’. Tick the box with the label ‘Enable scheduled clean-up and optimization’. After, specify how frequent you want the clean-up to be by choosing in the dropdown menu. After, click the ‘Save Auto Clean-Up Settings’ below to save.