-2

Is there is any plugin or method to check how much wordpress size is on disk.

Let's say I have two different directories (abc.com, abc.com/differentPath) on abc.com domain, and in both directories, separately wordpress is installed.

Now I want to check how much abc.com and abc.com/differentPath size on disk.

I want to know whole wordpress size including Media, theme, plugins, etc.

  • 1
    Lets say you have ssh access to a Linux OS variant, by using following command it will display the size of a folder (lets say WordPress): du -h wordpress . Want to have a plugin try this one. – Charles Aug 27 '17 at 16:07
  • down voted as I find it hard to see how it is remotely related to wordpress development – Mark Kaplun Aug 27 '17 at 16:23
  • @Mark-Kaplun just for you kind info, I am new to here and stackexchange won't allow me to create tags like (wordpress, count, size). since I don't have enough reputations. Hope you understand and stop down voting. – Saud Khan Aug 28 '17 at 22:55
0

Why using a plugin for that?

You can set a function to calculate the size of the 2 installations. The size of abc.com will include also the size of the other installation, but then you can subtract the smallest from the largest.

$path = ABSPATH;
$size = foldersize($path);


function folderSize ($dir)
{
    $size = 0;
    foreach (glob(rtrim($dir, '/').'/*', GLOB_NOSORT) as $each) {
        $size += is_file($each) ? filesize($each) : folderSize($each);
    }
    return $size;
}
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.