Comment

Comment by modernerd

The test is likely to be under-reporting WordPress installations as it stands.

The script seems to detect a WordPress site by looking for a meta generator tag containing WordPress:

https://github.com/tanrax/calculate-wordpress-usage/blob/5aa...

It's pretty common to remove that meta tag — popular WordPress theme frameworks like Genesis do it by default.

A more reliable test would be to look for additional strings in the source that point to the use of WordPress, such as “wp-content” and “wp-includes”.

A faster way that avoids string searches would be to send an HTTP head request to `/wp-login.php` and check for:

Set-Cookie: wordpress_test_cookie

(/wp-login.php doesn't always appear in the root directory and it's not always accessible to all IPs, but that setup is most common).

parent modernerd 7 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton