How to never again see WordPress’ update nag – no plugin necessary

February 8th, 2012

One reason I like WordPress is because they come out with frequent updates. When you run a WordPress site, it checks periodically for new versions. It reminds you with a helpful little yellow bar at the top. It feels great to install a new version, be up to date, and get rid of the nag. However, because of their awesome frequent updates, it also means you’re only ever free of that annoying reminder for a couple days.

A screenshot of the annyoing yellow bar

While it’s important to keep software up to date, I do have a life beyond updating WordPress. I wanted to get rid of that yellow nag once and for all. There are a couple plugins to disable it, but I don’t see any sense in adding more code (and more plugins to update) when I can just add one line to a stylesheet. So, here is how to rid of it at the cost of 13 characters per page load*:

Open wp-admin/css/colors-fresh.css. All newlines and extraneous spaces have been stripped from the file in the interest of speedier loading (this file loads anew every time you load a page in your Dashboard). Search for: #update-nag

In my version of WordPress, it starts on line 11593 of 34572. Expanded, it looks like the following:
#update-nag, .update-nag {
    background-color: #FFFBCC;
    border-color: #E6DB55;
    color: #555555;

Add the following after the opening curly bracket:
    display: none;

When you refresh the admin page, the update nag will be gone forever.

However! With great power moustache CSS comes great responsibility. The WordPress developers made such a prominent prompt because keeping software up to date is important. There are often important security improvements between versions. If you turn off the nag, you still have a responsibility to yourself, your users and The Internet at large to keep WordPress reasonably up to date. Put a recurring item in your calendar to update about once a month.

*You could also eliminate all the other styling applied to the now-invisible element and end up with fewer characters than you started.

Tags: ,

Comments are closed.