Both Google and site users love a fast site. Site speed is a ranking factor for most major search engines and users expect a site to load quickly on both mobile devices and PCs. Slow speeds can affect your site conversions, user experience and ranking in Google, so increasing the speed of your website can only help you.
Faster sites are indicative of well-maintained design and coding. They are also indicative of the state of the database behind your CMS – something that is often overlooked because it is unseen.
WordPress (WP) stores all your content in your database, including:
- blog posts
- Theme Settings
- Plugin Settings
- Portfolio items
- Form Entries
- Website Settings
If you update your website regularly, the longer you have your WP site, the more data it will have and the larger the database will be. Databases that are too large will affect how your site performs and take longer to retrieve the information for your users.
Since WP stores everything you need in your database AND many things you don’t, regularly cleaning your database is essential. By removing unnecessary data, you can improve the efficiency of your website.
Back up your site
Make sure to backup your website before doing anything about your database. It’s always better to be safe than sorry.
If something goes wrong while cleaning your database, a full backup can be restored to fix anything that could break in the process.
Optimize your tables with phpMyAdmin
phpMyAdmin is a free web application and a common way to manage your WP database.
It allows you to work with the MySQL database management system through a convenient graphical user interface (GUI). If your hosting provides access to cPanel, you can access your phpMyAdmin tool from your cPanel under: Databases†
From the phpMyAdmin control panel, locate the database corresponding to the WP website you want to clean and click on it.
You now have access to all the site data tables that you want to optimize and clean. If you have multiple databases and don’t know which one is the right one, go to your wp-config.php file by logging into your cPanel and finding your file manager.
Look in the root folder for the website you want to clean. Find the wp-config.php file, right click on it and then select edit.
To search DB_NAME to identify the database name for the site you are working on. After you have determined the name of the database, close File manager and cPanel†
Log in again phpMyAdmin† Scroll to the bottom of the list of tables and find and click Select everything†
You will see that it says With selected. click on Optimize table† phpMyAdmin will then automatically run a defragmentation application.
Remove unused plugins and themes
Plugins and themes take up a lot of space in your database. Deleting what you don’t use is an easy way to reduce the size of your database.
To search your installed plugins, log into your WP dashboard, hover over it Plugins and click Installed Plugins†
WP users often test many themes before choosing the design to use. Have you deleted the themes you don’t use?
To check, go to your WP dashboard and click Appearance->Themes to see if there is more than one.
Even deactivated themes still take up space in your database. This is not the case. You need to make sure to remove it completely.
Delete old obsolete messages
If there’s one thing you can be sure of about the Internet, it’s that things are constantly changing.
So if you’ve blogged for many years, it’s very possible that many of your older posts are no longer relevant or accurate.
Don’t just start removing outdated content. You should do a content check first and make sure to redirect the URLs of that content before removing it.
You don’t want to eliminate any inbound links you have. You should also make sure that anyone who comes to your site through that link is directed to a related post and not the “404 page not found” message.
Keep your site up to date
Old versions of WordPress, themes, and plugins can wreak havoc on your website and its database. Problems range from compatibility issues to security vulnerabilities that can slow down or even destroy your site.
Some WP designers like to wait a while when a newer version of WordPress comes out so that all the kinks are worked out. Let other people find the bugs so you don’t have to.
Make it a habit to update WordPress, your theme, and all your plugins shortly after a new version is released.
Using WordPress Plugins
As with most WP needs, there is a plugin for that. WordPress offers many database cleaning plugins to help you keep your site clean and uncluttered. Below are some of the more popular and useful ones.
When choosing a plugin, you want to make sure it’s compatible with your version of WP, still maintained, and recently updated.
One of the most powerful and effective plugins to clean up your database and improve your WP performance is: WP-Optimize† It is user-friendly and mobile-friendly.
Some of the features are:
- Defragment the MYSQL tables.
- Optimize your database without having to manually run queries.
- Removing unnecessary data such as spam comments, pingbacks and trackbacks.
WP Clean Up Optimizer
If you want to optimize your WordPress site and also clean unnecessary data from your database without using phpMyAdmin, WP Clean Up Optimizer is the plugin for you.
Some of the things cleaned up by this plugin are:
- Deleted messages.
- Pending comments, spam or trash.
- Automatic concepts.
- Pingbacks and trackbacks.
- Duplicate comment meta.
- Unused terms.
- Duplicated post meta.
Advanced Database Cleaner
When you delete old pages or post revisions to your WP dashboard, some unnecessary files are left in your database. These files slow down your site.
Advanced Database Cleaner will find those files, too orphaned items to reduce your database size and improve your site speed. Some of the creatures it removes are:
- Comments in Trash, Spam, or Pending.
- Old revisions of posts and pages.
- Be post meta.
- Old automatic concepts.
You can also schedule your database to be optimized and run automatically.
Optimizing and cleaning your WordPress database contributes to the overall performance and speed of your website. This will lead to a better user experience and more traffic from search engines.
As explained above, there are several things you can do to organize and clean up your database. For the less technical WordPress users, it is easier to use WP plugins than to work with phpMyAdmin.