Making WordPress Pretty

Info, linkedin, Software, Technology Jun 16, 2012 Comments Off

If you’ve got a WordPress website, which I do, you may be puzzled to see your page URL displayed as
\?p=31, when you want it to show up as “About”, or “Photo-Gallery”, or something else nice and professional looking…pretty, you might say. By the way, if you want to skip the paragraphs of drama and cut right to the solution, scroll down to “So here’s the trick”.

That’s where I was for several weeks…no, I didn’t spend every waking minute trying to figure it out, but I did follow the suggestions, and went to the WordPress Codex site:

http://codex.wordpress.org/Using_Permalinks

I learned a little, but came back to my Admin page more confused than ever. I’m not a webmaster in the true sense of the word, able to go under the hood and hack my way to success via HTML, or even WordPress-eze. So I tried the first suggestion of going to the Settings/Permalinks section of my Admin settings, and bravely changing the Permalinks setting to something “prettier”. After several seconds of trepidation, I pushed the Update button, and went to my website. The homepage was showing just fine, but when I clicked to navigate to any other page on my site, I got the dreaded 404 error. So I immediately broke into a cold sweat, went back to the Permalinks settings, and changed back to the default. Saved! My website was back in action, but no prettier than before.

When I had a bit of spare time between animation and television commercial projects, I started looking for plugins which might do the job which I seemed unable to do. I installed several, tried them out, made the Permalink changes, and…nothing! None of them seemed to work. Let me state that I’m using a WordPress template created by Kriesi, who has been very helpful throughout the process of “birthing” my website; so I figured that maybe the fact that my site was sitting within a template had something to do with the plugins not working. I’ll never know, since I didn’t want to bother Kriesi with something outside of his realm.

I had also read, right in the same Permalinks setting on my Admin page, that if only my .htaccess file was writeable, I wouldn’t be having this problem. You can find that all explained at:

 http://codex.wordpress.org/Using_Permalinks#Fixing_.htaccess_Generation_Issues

By the way, notice how pretty the WordPress URL is – Grrrrr! So I went under the hook again, to the root directory of my website, and started searching for the elusive .htaccess file…no dice! I finally figured out that I needed to turn on a switch in Filezilla, which allowed hidden files to be shown. If you ever need it, it’s in the Filezilla menu under Server/Force showing hidden files. Voila, hidden files showed up, but there was no .htaccess file anywhere to be found. After a bit more reading and head scratching – actually a lot of head scratching, I read somewhere that it’s possible to have a website up and running in WordPress without an .htaccess file.
Then I read somewhere else that it’s really easy to create your own .htaccess file, and then paste the suggested text which appears at the bottom of the Permalinks setting into that file, then copy it to the root directory of your website. I went through two weeks of wondering and worrying whether it would trash my site, then got up the courage this morning.

So here’s the trick, and it’s really simple:

Open Notepad, or a simple text editor, then go into your Admin page under Settings/Permalinks. Change the setting to whatever you want, then update – you’ll get the error message about the writable .htaccess file, with a paragraph of “code” further down the page, which you then cut and paste into the new Notepad file. Mine looked like this:

# BEGIN WordPress

RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ – [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]

# END WordPress

Save the Notepad file as htaccess.txt, because a file with a period at the beginning of it won’t be able to be saved in Notepad (the final filename will be .htaccess, but I’m getting ahead of myself). Send that file via Filezilla, or whatever FTP software you use, to the root directory of your website. Then, right-click the file, and choose Rename. Rename the file to “.htaccess”, and double check that it was renamed correctly and shows up with the “Force showing hidden files” switch turned on in Filezilla.

Now go back to your Admin page, update, and check your website. It worked like a charm for me, and would have worked two months ago if I hadn’t been hesitant to try what was suggested right on the Admin/Settings/Permalinks page. I hope this works for you. By the way, I’m using WordPress 3.0.3, and I use FatCow, the only wind-powered web hosting service I know of. I’m also running Vista Business 64-bit. Good luck!

Comments are closed.