How (and why) to change your WordPress permalink structure

Sorry for geeking out here, but I just discovered the solution to a longstanding problem and I haven’t seen a complete discussion anywhere else. So here goes…

The problem has to do with WordPress permalinks. A blog post’s permalink is the URL that search engines and directories use to find it on a WordPress blog like the one you’re reading. If a permalink changes for an existing post, the post disappears and searchers get a 404 error which not only is frustrating, but will cost you big time in the search rankings.

So why in the world would you want to change your permalinks in light of this risk? Because most of us made a mistake in the way we set up our permalinks to begin with. There’s a “Permalinks” tab in “Settings” on the WordPress dashboard and radio buttons to choose your structure and the default (as I recall) is to give each post a unique number like:

http://www.yoursite.com/blog/?p=123

But instead I thought it was useful to reference the date (at the beginning of Otisregrets, I was using it primarily as a communications tool in my copywriting class so it was important to have everything in chronological order) so I chose this option:

http://www.yoursite.com/2013/05/sample-post/

There are two things wrong with that structure. First, it means that every time a search result lists my post it will include the date. And I think most people give more credence to recent posts since an older one may have obsolete information. Second, you may want to republish older posts (like the ones from the early days of a blog, when you had far less readership). You can’t simply cut and paste to create a duplicate post; the search spiders hate this. But if you change the publication date in the WordPress dashboard to create a new post, then all your indexing disappears.

What I wanted to do is change the permalink structure to

http://www.yoursite.com/sample-post/

which means I can change the publication date (but NOT the title) and the search engines and indexes will still find it, yet it will be on the top page of my blog. And if you look at the urls of my posts now, that’s what I did. Here’s how.

1. Download your .htaccess file, which is in the top level directory of your WordPress blog. (Mine is in www.otismaxwell.com/blog for example.) This is the file which directs spiders and other indexing operations (including your own) as to where to find things on your site. You might not see the file immediately because many ftp applications hide “dot” files by default. I used Filezilla which has a setting under “Server” for “Force showing hidden files”; you want to check this setting and then .htaccess appears.

2. Make the .htaccess file visible on your local machine. This is necessary because neither Mac OS X nor Windows shows these files by default. In Mac it’s a simple matter of opening the Terminal and adding this line:

defaults write com.apple.Finder AppleShowAllFiles YES

After you do this, close terminal and restart Finder and voila, all your hidden files are now visible.

3. make a copy of the .htaccess file you downloaded and move it to a safe place on your local computer in case something terrible happens.

4. Open the .htaccess file in a text editor (I used TextEdit) and insert a line under # BEGIN WordPress to specify a 301 redirect. DO NOT MAKE A MISTAKE HERE OR YOUR POSTS WILL DISAPPEAR. Web programmer and SEO expert Joost de Valk has kindly provided a script which will create the correct code for you; read the article then click “generate redirects” and follow the prompts to create your own like of 301 code.

The revised code will look something like this:

# BEGIN WordPress
RedirectMatch 301 ^/([0-9]{4})/([0-9]{2})/(.*)$ http://www.yoursite.com/$3
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

# END WordPress

5. Upload the edited .htaccess file to your WordPress directory, replacing the old file, then IMMEDIATELY go to the Permalinks tab on the WordPress dashboard and change the format to:

http://www.yoursite.com/sample-post/

6. Test it by searching for a couple of your posts in Google or other search engine. The result should resolve to the new title of the post. You did it!

7. It’s a good idea to re-hide hidden files on your local machine so you don’t delete or alter one of these vital files by accident. To do this on Mac, just go into Terminal and enter the same instruction as previously but this time end it with “NO” instead of “YES”:

defaults write com.apple.Finder AppleShowAllFiles NO

UPDATE: Years later I find myself setting up a wordpress.com blog and find this option isn’t available; for this free platform you are stuck with the http://www.yoursite.com/2013/05/sample-post/ format with the date in the middle of the permalink. This is true even if you pay for one of the available upgrades, to Premium or Business.

Instagram, iPhone and the photo-based social network

A couple I know bought a fancy camera before the birth of their first baby. It’s sitting in a drawer somewhere. Turns out that their trusty iPhone does everything they need: they can shoot a pretty good photo, touch it up with Instagram, and shoot it out to their friends immediately.

Instagram is interesting. Dave Kerpen wrote an article about it over on LinkedIn called “And the Future of Social Media Is” and the answer is… not Tumblr, just acquired by Yahoo, but Instagram. His 10 year old daughter and her friends used it to exhaustion on a recent weekend trip, adding insta-apps to expand the conversation as they went. As opposed to Pinterest, which sends lots of traffic to my food blog but seems mainly a scrapbooking application, Instagram really works as a fully functional social network–and it’s a lot easier to shoot and share a picture than to write an update.

One of those apps, Instafollow, allows users to automatically follow or unfollow up to 160 users per hour, up to an ultimate count of 20,000 users, simply by following followers of a user. That’s a lot more power than Twitter and a lot easier to execute. No wonder my own kid, who’s fairly responsible on Facebook, got me in so much trouble on Instagram that I had to delete my account. Snap a picture, slap some text on it, and you’re good to go.

I just put the account back up and already I’ve got new followers and a writing opportunity thanks to Instagram. My username is otismaxwell if you care to meet me over there.

Attention copywriters: nobody likes a downer….

Just finished watching “Young Adult” with Charlize Theron. The good news: great performance, solid directing. The bad news: it was free on Amazon Prime, barely 12 months after release. And therein hangs a story….

This movie is a downer. A ghost writer of “young adult” fiction gets a birth announcement for the baby of her old boyfriend. On a whim she decides to return to her small hometown and win back the old beau and in the process gets tangled up with a former classmate who was or was not gay but in any case was maimed by jocks who thought he was gay and now is as physically crippled as she is mentally. Are you laughing yet?

I wanted to see this movie when it first came out based on some trailers showing Theron trying to hide her dog checking into a motel and other deadpan moves. So did 8 or 9 other people but it didn’t work. The plot is incredibly depressing and you do not leave the film with an uplifted morale. So nobody wanted to see it except a very few who told their friends to stay away.

Moral for us copywriters is, nobody’s going to read something that makes them feel bad. Okay to turn on the spigots of negativity, but be sure to transition to that golden shower of redemption before you’re done… AND you need to let them know at the outset that said redemption is in sight. Make sense?

Too much of a good thing from Values.com?

HenryFordValuesBillboard
Values.com billboard in Latham, NY

I pass this billboard frequently on a busy highway in upstate New York. It has multiple inspirational headlines stacked like cordwood: Driven/ Innovation/ Pass It On/ Values.com. To the left, a photo of Henry Ford (we know it’s him because there is a caption that says Henry Ford), driving (not being driven in) an early horseless carriage. The net effect is too much of a good thing, and I see it all the time, so I finally had to write about it.

Part of the problem is that the placement is a stone’s throw from Troy, NY, birthplace of the Arrow shirt, the cast iron stove, Uncle Sam and The Night Before Christmas among innovations. It sticks in our craw that they chose a non-local for their innovator. But the bigger issue is the multiple inspirational sayings when just one or two would do. It’s like too much candy on Halloween.

I headed over to Values.com to learn more about exactly what inspires them to inspire. It’s an interesting website. You can’t join them or give them money or get money from them; they’re doing this because “We believe that people are basically good and often benefit from a simple reminder.” Fair enough, and a good reason they deserve a little gentle nudging to make sure those reminders are effective.

There’s a section on the website called “Billboards” and on it you can create your own values billboard and look at it online, or look at billboards others have created. Each has one photo, one headline and one value and works a lot better than Values.com’s “Driven” effort. Give it a try. (But be sure your inspiration is not something naughty like “beer” or you’ll get a server error.)

By the way, what the website does not say is that Values.com is apparently funded by evangelical Christian Phillip Anschutz, who according to Wikipedia has also funded a think tank that criticizes evolution and a ballot initiative designed to overturn local and state laws that prohibit discrimination against individuals on the basis of sexual orientation. If I were Mr. Anschutz, I would identify myself and make my case on the website rather than leaving it to the curious visitor to go googling and draw their own conclusions.