The Website Speed

    • WordPress Speed
    • WordPress Security
    • WordPress Themes
    ✕

    Why and how can you maintain your WordPress database?

    WordPress Speed

    Why and how can you maintain your WordPress database?

    TheWebsiteSpeed February 4, 2019

    Sharing is Caring
    •  
    •  
    •  

    This site contains affiliate links to products. I may receive a commission for purchases made through these links. Please read my Affiliate Disclosure for more info.

    Maintaining and optimizing doesn’t magically create an amazing website, from a rudimentary, leisurely website, but it helps achieve it. If you imagine speed optimizing as a large cake, this would be a slice of it.

    You don’t have to freak out, if MySQL, the database table and similar expressions sounds Chinese to you, as I will explain everything step by step, what is what, and what you have to do to achieve a fast and maintained database. Let’s get started!

    Table of contents

    1. What is a database?

    2. What kind of information does the database store?

    3. What else can increase the size of the database?

    4. Why is it important to maintain your database?

    5. How can you maintain your database?

    6. How to install, configure and use WP-Optimize?

    What is a database?

    The database, as it is suggested by the name, serves to store data. Content management systems (WordPress, Joomla) wouldn’t work without MySQL database.

    The database is made up of tables, in which you find different informations. The WordPress creates 11 tables during installation, and the number of tables grow as you install various plugins. Not only does the number of the tables, but their sizes increase too, but we will get into that later on.

    What kind of information does the database store?

    In the database information on settings regarding the website and extensions, the user’s data, the entries data and metadata, categories, tags, comments without the requirement to be complete can be found.

    As you can see, all the important information can be found in the database. As you start using the website more, install various plugins, create more and more posts, the size of the database starts increasing too.

    What else can increase the size of the database?

    WordPress provides a very handy function, saving an entry’s or page’s version (post revisions). Every time you are editing an entry and press save, it creates a new version. From this version you can bring back the entry’s previous versions.

    This is a very useful function, however, if you have lots of entries and you edit them often, there is a good chance that your database contains versions that you don’t need anymore. And these can increase the size of your database by a good bit.

    Why is it important to maintain your database?

    hdd
    Source: Pixabay.com

    Try to imagine your database as your computer’s hardware. When you copy and delete files, and install and uninstall programs, leftover files stay on your computer and your hardware becomes fragmented. If your hardware is fragmented, it takes longer to receive data and your computer becomes slower.

    The database behaves the same way. When the website is running it receives information from the database. If the database is too large, because it contains unnecessary data and it is fragmented, then receiving the data will take longer and your website will be slower too.

    How can you maintain your database?

    It’s important, that before you use any of the maintenance methods, you make a backup of the database. You can do this with the help of PHPMyAdmin, or with the cPanel Full backup function.

    siteground

    The PHPMyAdmin is there to manage the database, therefore one of the maintenance options is running the PHPMyAdmin’s optimizing database function.

    The other option, if you are using the WordPress admin interface, is to use an extension to clean out the database and do a defragmentation. For this the WP-Optimize provides a good solution, and now I’m going to demonstrate how to use it.

    How to install, configure and use WP-Optimize?

    wp optimize

    The WP-Optimize is the most popular database optimizing extension on WordPress. It can take pride in the over 800.000 current installation and the 4.9 average rating. When writing this article (30.11.2018) it was updated two weeks ago, as the developers are constantly working on it.

    There are two options for installing:

    The first one is downloading the extension from the WordPress Plugin Directory, following this link: WP-Optimize, then uploading the package through the Plugins–>Add New by clicking on Upload extension.

    The other option is going to the Plugins–>Add New, and write in WP-Optimize on the right hand-side search bar. It’s the first orange coloured icon that you have to install, and then activate.

    wp optimize

    The WP-Optimize text and icon on the WordPress’ admin interface left hand-side will appear, after the installation and activation, and by clicking on it you can open the extension’s settings.

    wp optimize

    On the extension’s page there are 4 tabs: WP-Optimize, Table information, Settings, Plugin family.

    On the WP-Optimize tab you can see the various actions, the first 6 is automatically ticked, these settings are safe and enough (optimizing database tables, deleting entry edits, removing spam and deleted comments, removing draft and deleted entries, removing not approved comments).

    wp optimize

    On the right hand-side of this site, you can also see the PHP and MySQL version, the actual settings regarding the maintenance, and the current size of the database.

    On the Table information tab you can see the tables that create the database, and the information regarding their sizes and types. You don’t have to do anything with this.

    wp optimize

    On the Settings tab, there are two sections, the General settings and the Scheduled clean-up settings.

    If you are using the General settings, the first option – Keep last 2 weeks data – is ticked, you can set to keep the data from the last two weeks, and delete the previous ones. This number can be edited of course.

    This version is optional, I don’t use it myself, but if you would like to keep the last few edits of your entries, than it might be useful to you.

    wp optimize

    In the Scheduled clean-up settings you can activate WP-Optimize to automatically maintain the database at specified intervals. This is a very comfortable option, but I personally don’t use it. I prefer to run the database’s maintenance myself, after creating a backup.

    You don’t have to do anything with the Plugin Family tab, this is technically an advertisement for the extension developers.

    wp optimize

    When you complete the backup and get to know the possibilities through the extension, there is nothing else left, but optimizing the database. You don’t have to do anything else, other than clicking on the blue buttoned Run all selected optimizations.

    wp optimize

    The WP-Optimize starts it’s job, and once it is finished on the Status box you can see how much space did the extension free in the database.


    Sharing is Caring
    •  
    •  
    •  

    Next Article

    The Ultimate WordPress Security Guide – Secure Website in 15 Steps

    Latest Posts

    9 Easy Ways to Speed Up Your WordPress Site – The Ultimate Guide to WordPress Speed Optimization

    9 Easy Ways to Speed Up Your WordPress Site – The Ultimate Guide to WordPress Speed Optimization

    How to Select the Best WordPress Theme for Your Website?

    How to Select the Best WordPress Theme for Your Website?

    The Importance of Caching – The 6 Best Cache Plugins

    The Importance of Caching – The 6 Best Cache Plugins

    • About me

    Categories

    • WordPress Speed
    • WordPress Security
    • WordPress Themes

    WordPress Speed

    • 1. Why is it important for a website to run fast?
    • 2. What factors can slow down the website’s loading time?
    • 3. How to test the speed of your website?
    • 4. How to fix the speed of a WordPress site?
    • 5. 9 Easy Ways to Speed Up Your WordPress Site – The Ultimate Guide to WordPress Speed Optimization
    • 6. How to Select the Best Web Hosting Service?
    • 7. How to install and configure Autoptimize?
    • 8. The Importance of Caching – The 6 Best Cache Plugins
    • 9. Why and how can you maintain your WordPress database?
    • 10. Why and how should you use Broken Link Checker?

    WordPress Security

    • 1. Is WordPress Secure?
    • 2. The Ultimate WordPress Security Guide – Secure Website in 15 Steps

    WordPress Themes

    • 1. How to Choose WordPress Theme?
    • 2. Pros and Cons of Free WordPress Themes
    • 3. Pros and Cons of Premium WordPress Themes
    • 4. How to Select the Best WordPress Theme for Your Website?

    Web Hosting Services

    • 1. SiteGround
    • 2. WP Engine

    Free and Premium WordPress Themes

    • 1. Divi – Elegant Themes
    • 2. StudioPress WordPress Themes
    • 3. WordPress Theme Directory

    WordPress Speed Optimization

    • 1. A3 Lazy Load
    • 2. Autoptimize
    • 3. WP Rocket
    • 4. WP Fastest Cache
    • 5. reSmush.it
    • 6. Optimizilla
    • 7. GTmetrix
    • 8. Pingdom Tools
    • 9. WebPageTest
    • 10. PageSpeed Insights

    Information

    • Affiliate disclosure
    • Cookie Policy
    • Privacy Policy
    The Website Speed © 2019 All rights reserved!
    We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.OkCookie Policy