There are many reasons why you want WordPress to be as fast as possible. The least of which is user experience. Visitors are extremely impatient with slow loading sites. Google has zero’d in on this fact and has now added site speed as one of its 200+ ranking factors.
Reduce data base requests
Use DB Cache to cache data base queries so that the dedicated server does not have to access the MySQL database. Database queries use up a significant portion of server resources. By only performing the database query once for multiple visitors, you free up resources to quickly download the page.
Once the plugin is activated, you will see the following at the bottom of your content if you have wp-footer() in your site:
Generated in 0.730 seconds. Made 23 queries to database and 9 cached queries. Memory used - 19.67MB
Cached by DB Cache
As you can see, it gives you a readout of how many queries were performed and how many were pulled from cache.
Optimizing your MySQL database
If you have ever used Steam for gaming, or defragged a computer hard drive, you are familiar with this concept. Basically, phpMyAdmin gives you the ability to repair corrupted data and optimize tables.
Open your phpMyAdmin panel and navigate to the database structure. Select all of the tables and select ‘Repair tables’.
Repeat the process and this time select ‘optimize’. Your MySQL database will be running at maximum capacity.
Tip: to keep from having to do this manually, you could just create a cron job and do something like this in a php file:
$sql = 'OPTIMIZE TABLE `wp_commentmeta`, `wp_comments`, `wp_links`, `wp_options`, `wp_postmeta`, `wp_posts`, `wp_terms`, `wp_term_relationships`, `wp_term_taxonomy`, `wp_usermeta`, `wp_users`';
Please stay tuned for Part 2 of How to Optimize WordPress for Speed.