1 min read

WordPress Total Words Counter

WordPress Word Counter

As the year is coming to a close a lot of sites are creating year in review style posts. I love these because I find it interesting how my stuff compares to them and I try to find little nuggets of information on what I should be doing better.

Alex King has been doing this for the past 9 years and has created a little gist for generating a lot of useful stats.

To take this a step further I wanted to count the total words I published for the year and I put together a little script if you’d like to do the same:

https://gist.github.com/ericbarnes/a6406ba3359e2232c86d

Granted this method is simple and the php function str_word_count is not entirely accurate. If you’d like to get fancy a Word Stats plugin does exist but I found that it wouldn’t work at all with the current version.