Why Are Directory Sizes Incorrect in Health Check & Troubleshooting?
Content
If you've recently cleaned up your WordPress site's files but the Health Check & Troubleshooting plugin is still showing the old, larger directory sizes, you're not alone. This is a common and frustrating issue reported by many users. This guide will explain why it happens and walk you through the steps to resolve it.
Understanding the Problem
The plugin's 'Directory and Sizes' section on the Info tab is designed to calculate the space used by your WordPress core, uploads, themes, and plugins. However, users frequently report that these calculated sizes do not update after files have been deleted. In some cases, the sizes shown are much larger than reality; in others, they are significantly smaller. The display might also get stuck showing "Loading..." indefinitely.
Why Does This Happen?
Based on community reports, this behavior is typically caused by one of two issues:
- Cached Data: The plugin may cache the calculated sizes to improve performance. If this cache is not automatically cleared after file changes, it will continue to display outdated information.
- Technical Glitches: Past updates to the plugin or to WordPress core (like the changes in WordPress 5.2 and 5.6) have occasionally introduced bugs that disrupted the directory size calculation process, causing it to fail or return incorrect data.
How to Fix Incorrect Directory Sizes
Solution 1: Clear All Caches
This is the first and most important step. Caching can occur at multiple levels.
- Plugin/Object Cache: If you use a caching plugin (e.g., WP Super Cache, W3 Total Cache) or a server-level object cache (e.g., Memcached, Redis), clear them completely from their respective settings panels.
- Browser Cache: Hard refresh your browser (Ctrl + F5 on Windows, Cmd + Shift + R on Mac) or clear its cached images and files.
- Wait and Retry: Some hosting environments have their own caching mechanisms. If the above doesn't work, wait a few hours and check again to see if the sizes have updated.
Solution 2: Verify the Issue with Another Tool
Before spending too much time troubleshooting, confirm the actual size of your directories using an alternative method. This will tell you if the problem is with the plugin's reporting or a broader server issue.
- Use a plugin like Disk Usage Sunburst.
- Check your hosting control panel's file manager, which often shows accurate disk usage statistics.
- Contact your hosting provider's support and ask them to verify the current size of your website's directory.
Solution 3: Check for a Stuck Process
If the size calculation is stuck on "Loading...," it indicates the process is failing to complete.
- Navigate to Tools > Site Health > Debug.
- Look for any errors related to
wp_ajax_health_check_get_sizesor REST API calls. - Check your WordPress debug log for more details. If you see a notice that
wp_ajax_health_check_get_sizes was called incorrectly, this is a known issue that was addressed in a plugin update to align with changes in WordPress core.
Solution 4: Ensure Everything Is Updated
Many past issues with directory sizing were resolved in plugin updates. Ensure you are running the latest version of the Health Check & Troubleshooting plugin, as well as the latest version of WordPress. Outdated software is a common cause of conflicts and bugs.
When to Seek Further Help
If you have tried all the steps above and the problem persists, the issue may be more specific to your server environment. The next step is to gather more information for troubleshooting:
- Go to the Debug tab in the Health Check plugin.
- Click the "Copy site info to clipboard" button.
- You can share this information on independent support forums like this one for more targeted help. The data can help experts identify conflicts with other plugins, your theme, or server configuration.
Remember, the directory size feature is a helpful tool for estimating space usage, but for mission-critical accuracy, always double-check with your hosting provider's tools.
Related Support Threads Support
-
Wrong use of spacehttps://wordpress.org/support/topic/wrong-use-of-space/
-
WordPress 6.6 -Query to directory-sizes of wp-site-health json returns 500 errorhttps://wordpress.org/support/topic/wordpress-6-6-query-to-directory-sizes-of-wp-site-health-json-returns-500-error/
-
Site Health says I don’t have a Page cache, but I have WP Super Cache.https://wordpress.org/support/topic/site-health-says-i-dont-have-a-page-cache-but-i-have-wp-super-cache/
-
Disk space available – Glitch?https://wordpress.org/support/topic/disk-space-available-glitch/
-
Directory size checking is not workinghttps://wordpress.org/support/topic/directory-size-checking-is-not-working/
-
After update today, site check no longer workshttps://wordpress.org/support/topic/after-update-today-site-check-no-longer-works/
-
Database Table or Database Namehttps://wordpress.org/support/topic/database-table-or-database-name/
-
“Your PHP Version Requires An Update”https://wordpress.org/support/topic/your-php-version-requires-an-update/
-
site should be improvedhttps://wordpress.org/support/topic/site-should-be-improved/
-
Anyway of including the total database sizehttps://wordpress.org/support/topic/anyway-of-including-the-total-database-size/
-
Help text does not reflect modified logfile namehttps://wordpress.org/support/topic/help-text-does-not-reflect-modified-logfile-name/
-
wp_ajax_health_check_get_sizes was called incorrectlyhttps://wordpress.org/support/topic/wp_ajax_health_check_get_sizes-was-called-incorrectly/
-
Critical Autoloaded message even if autoload is total 786KBhttps://wordpress.org/support/topic/critical-autoloaded-message-even-if-autoload-is-total-786kb/
-
Site health info shows wrong directory sizeshttps://wordpress.org/support/topic/site-health-info-shows-wrong-directory-sizes/
-
Localized timezoneshttps://wordpress.org/support/topic/localized-timezones/
-
PHP post_max_size warninghttps://wordpress.org/support/topic/php-post_max_size-warning/
-
PHP info is not showinghttps://wordpress.org/support/topic/php-info-is-not-showing/
-
Heavy website loadinghttps://wordpress.org/support/topic/heavy-website-loading-2/
-
recommended improvement “You should use a A persistent object cache”https://wordpress.org/support/topic/recommended-improvement-you-should-use-a-a-persistent-object-cache-2/
-
File integrity > Version.phphttps://wordpress.org/support/topic/file-integrity-version-php/
-
Timehttps://wordpress.org/support/topic/time-24/
-
CSS conflict Site Health Info tableshttps://wordpress.org/support/topic/css-conflict-site-health-info-tables/
-
Do I still need it?https://wordpress.org/support/topic/do-i-need-still-it/
-
jQuery Bughttps://wordpress.org/support/topic/jquery-bug-3/
-
Site slowed down after upgrading to v. 1.4https://wordpress.org/support/topic/site-slowed-down-after-upgrading-to-v-1-4/
-
wp_ajax_health_check_get_sizeshttps://wordpress.org/support/topic/wp_ajax_health_check_get_sizes/