• Resolved marvinj920

    (@marvinj920)


    I’ve installed your plugin, I used it to primarily used to remove many revisions. According to your plugin, the database has been reduced quite significantly, and the revisions have been removed from the back end. However, when I looked at the database size via cPanel, the number has not decreased… In fact it did go up 2.3MB.

    Just trying analyze and find out what is actually going on.

    Thank you for your great work!

Viewing 1 replies (of 1 total)
  • Plugin Support Val Meow

    (@valwa)

    Hey @marvinj920! ??

    The plugin calculates the size of a database by summing up the sizes of all its tables. Here’s a step-by-step explanation:

    1. It retrieves the size of each table in the database by executing a SQL query that selects the table name and its size (calculated as the sum of DATA_LENGTH and INDEX_LENGTH, which represent the length of the data and indices in the table, respectively) from the information_schema.TABLES table. This table is a meta-table provided by your database that contains information about all other tables in the database.
    2. The sizes of all tables are then summed up to get the total size of the database in the get_database_size function.

    As for why the size might not reduce in cPanel, it’s likely due to how the size is calculated and what it includes. The plugin’s code here only considers the data and index length of the tables. However, cPanel might be considering additional factors like log files, temporary files, or other overhead that your database uses for managing. These additional factors are not reduced when you delete data from your tables, which might explain the discrepancy.

Viewing 1 replies (of 1 total)
  • The topic ‘Database Size doesn’t seem to match cPanel size’ is closed to new replies.