How To add .bypostauthor attribute to WordPress comments

When I comment on my own blog, WordPress is supposed to automatically add the .bypostauthor attribute to my comment so that it can be styled via CSS to make it stand out from comments by other users. After recently exporting my blog from to self-hosted, I noticed that new comments were getting the .bypostauthor attribute, but older ones had nothing.

I spent quite a while searching online for help to no avail, so I decided to dig through the database on my web server. This is risky, because it is easy to make a complete mess of things if you don’t know what you are doing. I didn’t, but I pay for a backup service in case I ever need to restore things.

I opened my database using phpMyAdmin and browsed to the wp_comments table. I quickly discovered that recent comments I had made (which were getting the .bypostauthor attribute) had a user_id of 4. Older comments had a user_id of 0. I manually changed a couple of them from zero to four to see what would happen, and was pleasantly surprised to see the .bypostauthor attribute and CSS styling being added to my comments when I refreshed a blog page.

My next challenge was changing the 0 to 4 on all of my comments, which numbered close to a thousand. I started doing it manually, but quickly decided it would be too time-consuming. After searching online for SQL queries, I found something that worked.

UPDATE `wp_comments` SET `user_id` = '4' WHERE `comment_user_email` = 'authoremailaddress';

I entered this under the SQL tab of phpMyAdmin, made the necessary changes, and anxiously clicked Go. It worked!

Hopefully this will help someone in a similar situation. You will need to look under your wp_users table to see what the user_id is of your admin account first, then change the code above to reflect your user_id and your email address.

Good luck and be careful!

2010 in review

In 2010:

  • We sold our existing home and bought a new one
  • We bought a ZTR mower
  • Honey suffered a concussion and spent a few nights in the CCU
  • I spent Thanksgiving and Christmas at his parent’s home for the first time
  • We went to Holiday World again
  • We toured Springfield, IL – hometown of Pres. Abraham Lincoln
  • We began extensively remodeling our new home, which included a new roof, HVAC unit, and tankless water heater
  • I met Honey’s sister, brother-in-law, and niece for the first time
  • I talked to Jim on the telephone (!)
  • I bought my first truck
  • We finally got a storm shelter
  • I got my first smartie-pants phone – the Droid Incredible
  • We had a white Christmas!!
  • I saw David Gray and Ray Lamontagne in concert
  • This blog has its highest number of page views in a single day (11,539)

Plans for 2011:

  • Go somewhere fun for vacation (maybe Washington, DC)
  • Get a lot more done on the house
  • Pay off my car loan
  • Save more $$

I wish…

…I still wrote on this blog regularly.

…I had never left

…I had never given this site address out to anyone I know IRL besides my partner.

…I hadn’t paid for three years of hosting and domain names.

…I had the courage to “speak” my mind here regardless of who is reading.

WordPress: The advantages & disadvantages of self-hosting

I recently made the leap from to self-hosted – which in simple terms means that I bought server space and installed WordPress’s free software to run my own blog. It didn’t take long to see the downside of the transition. Traffic increased unexpectedly, my web host freaked out, and caught between a rock and a hard place, I moved my blog back to

Since that time, I have contacted several other web hosts and asked about how they would have handled the same situation. None of them have guaranteed that they wouldn’t have handled it the same way, but BlueHost does look the most promising with their shared hosting CPU protection. If and when I decide to make the jump again, I will probably be giving them a shot.

If you’re still reading, you might be interested in knowing why I’d want to leave where I get relatively free hosting and don’t have to worry about behind-the-scenes things like server overload and backups. I say “relatively” because I do pay for certain things – like my domain name, domain mapping (connecting the domain name to my blog), and the ability to edit my CSS file. All of that runs me about $35/year. While self-hosting would cost a bit more annually, it would give me access to many more options… and responsibilities.


  • Thousands of themes at the click of a button
  • The ability to edit the functions and display of my themes & CSS files
  • Thousands of available plugins (add-ons that can be used for virtually anything on a blog you can imagine)
  • Total control over my own website
  • Option to add advertising or keep blog completely ad-free
  • Ability to access and backup my files via FTP
  • Managing my own database
  • Excellent resources online for fixing almost any WordPress problem
  • Can add Google Analytics for in depth reports on traffic to site


  • Worrying about site going down because of spikes in traffic
  • Worrying about backups
  • No direct support for WordPress software (only via other users)
  • Being responsible for installing updates for WordPress and any activated plugins
  • More money out of pocket
  • Virtually no traffic from blogs

It seems that the advantages definitely outweigh the disadvantages… at least for me. =)

Moving on up

You may or may not have noticed, but I’ve been working like a mad dog to get my blog moved to its own server recently. I made the switch from a free (and restricted) blog at to my own web host and an installation of WordPress’ blogging software.

Why? Simply put, because I have wanted to do this for a long time and recent difficulties with support on forced me to take the plunge. I contacted them a week ago because many of the images on my older posts weren’t loading. I even provided an example post, but have gotten no resolution or even further contact from them. At least with my own server, I won’t be held hostage when a problem arises.

I still have a few kinks to work out – namely with the images. Although the export/import process worked fairly well (who am I kidding, it was painful), there was no way to pull over the aforementioned missing photos. I will have to manually go through and either re-upload them or delete the broken links.

Another thing I’m a little bummed out is losing over three years of stats. My free blog on WordPress had over 400,000 hits, but the statistics engine on this installation is starting from scratch.

I’ll comfort myself in the knowledge that I can install and uninstall as many plugins as my little heart desires, or maybe place a few contextual text ads to cover the cost of my hosting – both things that weren’t allowed on

Interesting search terms #2

More fascinating search terms from my blog stats for your reading enjoyment:

wooden spoons hurt

I’ll just take your word for it.

i feel stuck inside myself

That’s gotta hurt.

sex sounds – calling out “oh Brian”

I can totally understand that.

indian coming out stories

Just change your name to something like “Rainbow Spirit” or “Flamingo Feather” and there will be no need to explain anything.

my father is attracted to my sister

I just puked a little in my mouth.

straight but like penis

Then… you probably aren’t straight, buddy.

fighting toast pics

In the left corner we have Slightly Burnt, who will be challenging our reigning champion, Buttered Bottom.

homosexual can’t marry a woman

I know a few who could… and did.

daddys lil whore pictures

Yuck. How in the world did that bring them here?

how to tell someone your pregnant

Wearing a maternity dress on your next date will probably do the trick.

Related Posts:
Interesting Search Terms #1

Interesting search terms #1

WordPress gives us loads of interesting statistics about our traffic, and one of my favorite features is the list of keywords that people enter into search engines to find my site. Some of them leave me shaking my head and wondering how on earth they brought the person here.

I’ve been keeping a running list for the last several days with some of the most intriguing strings and thought I’d share them and add a little commentary. Enjoy!

100 ways on cursing people out in german

Someone must have been having a very bad day at work.

Womens mouths taped shut

Either a man with a kinky imagination or a woman with a chatty co-worker.

fish oil on your butt

I don’t even want to know.

how to tell if a guy is gay

Maybe a guy with a really cute co-worker?

annie lennox removed her bra

Hmmm… I’d pay to see that. Surely someone had a cellphone camera!

puppy not allowed in school

Doggone the bad luck. Pun intended.

eat junkfood to get a butt

What’s with all the butt stuff? This does work, though.

too old for bon jovi purse?

If you have to ask, then you already have your answer.