Tag Archives: WordPress

Akismet altocumulus blogging comment spam compliment spam Google Google Docs how-to navigation plugin poll social engineering spam spyware tagging trust web-development webspam

WordPress Keeps Switching Back to the Default Theme? Here’s a Fix.

I recently started updating my blog again, including a spiffy new theme.  Within a day, my blog had reverted back.  I double-checked my settings and switched the theme to the new one again, and the same thing happened.

If this is happening to you, it might be a file permissions issue on your server.  WordPress tries to be maybe a little too helpful in this case – it has a function called validate_current_theme() that tries to make sure required files for the theme exist and if not, reverts to the default theme that function uses the PHP function file_exists().

You may be able to fix the issue by using an FTP client or SSHing to your server and changing the file permissions of the theme’s style.css and index.php.

If that’s not helping, you can always change the name of the template dir to “default” – WordPress doesn’t do the switch if it thinks you are already using the default theme.

Spring Cleaning – 4 Steps to Rehab Your Old WordPress Blog

I’m thinking about doing a bit more writing, and to be honest I have left this blog pretty unloved since my last redesign in… hmmm… 2008? Much has chanced since then – for example, a huge percentage of visitors these days are on tablets and mobile devices. Your old WordPress theme might not look very nice on an iPhone or Nexus 5 (I know mine didn’t).

I spent a couple of hours shaking the cobwebs off my old WordPress site, taking it from this:

The old WordPress default theme with minor tweaks

To what you’re looking at now. I also made a few small changes to speed up my blog.

Step 1: Update your theme

This used to be a huge pain, requiring you to download files, customize the HTML and CSS, and upload it to your server. The WordPress theme system is a lot friendlier now. I just went to to Appearance -> Themes and clicked the “Add New” button. This gives you search box, but I found the “Featured” link was the best place to start. I chose TwentyThirteen, it allows me to set a nice big header image and it looks good on different screen sizes. The current header is a photo of the Sierras from Lone Pine, CA.

Step 2: Clear out old widgets and code

I used to have a bunch of extra widgets in my blog, but many of them were never really useful for my readers or now pointed to defunct services (I still miss you, Google Reader!). I cleared out a Feedburner widget, an old version of the Google Translate widget, and a few other things. You might be surprised how much you can improve your site’s loading time just by deleting some inefficient Javascript.

Step 3: Speed it up

Speaking of loading time, my site was abysmally slow. Not slow enough that I noticed on my fast connection at home, but faster sites make users and search engines happier. One of the best tools to find bottlenecks is Google PageSpeed. You can have Google analyze your site and get a detailed report of the problems or install a Chrome or Firefox extension to check from your browser.

A few things worth checking:

  1. Are you compressing your files? You can set up Gzip compression on your server or use a plugin like WP Super Cache.
  2. Are you telling browsers when they can use their own cache? Instead of sending a page or image to a user, you can let them know they can use their cached version with a 304 Not Modified HTTP status code. WP Super Cache also has a setting for this.
  3. Are you hosting your own copies of common libraries like jQuery? I’m using a plugin called Use Google Libraries that points to widely-cached copies of these files on Google’s servers.
  4. Are you regenerating pages from PHP and MySQL every time someone visits? If your pages don’t change very often, use WP Super Cache.

Step 4: Actually start writing again

This is the hard one. I feel like between work, family, and posting small things to social networks, I’ve lost the time and energy to write longer-form articles. I have a fun project coming up that will definitely prompt some posting, and this article itself is a start, right?

If you have any other tips for cleaning up a WordPress blog or getting back into writing, let me know in the comments.

Blog Comment Spam is Not Solved

With all the comment spam, trackback spam, and pingback spam out there, developers have created some pretty powerful anti-spam tools. So why did I create a small, not-so-powerful anti-spam WordPress plugin like O RLY?

Here’s a screenshot of my pending comments a little while back. Notice the second comment, which slipped past Akismet:

o-rly-spam-comments1

Apparently some dude named Casey Fronczek wanted to let my readers know about his fishing trips. I clicked on the O RLY button, and here’s what Google had to show me:

o-rly-spam-comments2

This spam comment showed up about 17,000 times!

This is an interesting case because it shows that spammers aren’t always looking to place links or pass PageRank. They are always looking for some kind of payoff though, and you can see the roundabout technique here. Hopefully anyone interested in fishing trips in southern Florida will Google this guys relatively unique name and result in a sale. You may also see phone numbers, ICQ or other IM accounts, and similar contact information in some comment spam.

This is a little tougher to automatically delete because a spammy link is a really good signal for an automated filter. Hopefully if people have enough little tools, we bloggers can improve the state of the web as a whole. Get the plugin from WordPress.org, and please let me know of other good anti-spam plugins in the comments.