Welcome to the new design! Please report any bugs or issues, thanks :)
Web Dev + WordPress + Security

Create New Permalink Category

If you are running WordPress 2.0.2 and have enabled permalinks, you may have had problems creating a new category or page to your site. I recently encountered this dilemma and devised the following strategy for adding, editing, or even deleting WordPress categories and pages. Note: this tutorial assumes you are running Apache.

Step 1

First, open wp-includes/vars.php and find (around line #39):

$is_apache = ( strstr($_SERVER['SERVER_SOFTWARE'], 'Apache') || strstr($_SERVER['SERVER_SOFTWARE'], 'LiteSpeed') ) ? 1 : 0;

Comment out that line and add the following:

$is_apache = 1;

Save the file and upload it to your server.

Step 2

Next, check the file attributes of your htaccess file(s). Ensure that the file is writable with a setting of either 666 or even 777 (or whatever works best on your server).

Step 3

Finally, create or edit the necessary category or categories, publish a post or two under the new/edited category, and then double-check that everything is working as expected.

Step 4

Now that you are a big winner with your new category, be sure to change the htaccess file permissions back to 644 or equivalent. Also, comment out the new line in the vars.php file and uncomment out (i.e., comment in) the original line of code.

Jeff Starr
About the Author
Jeff Starr = Creative thinker. Passionate about free and open Web.
Blackhole Pro: Trap bad bots in a virtual black hole.
Welcome
Perishable Press is operated by Jeff Starr, a professional web developer and book author with two decades of experience. Here you will find posts about web development, WordPress, security, and more »
WP Themes In Depth: Build and sell awesome WordPress themes.
Thoughts
Never force your users to type out a password (or any long string of characters) by blocking the paste function. Typing long strings leads to MORE errors than simple copy/paste.
Checking in to anyone listening. Stay safe. Pay attention. Don't get lazy.
What's up with Plesk UI lately? Especially on Chrome it looks just awful, all kinds of broken. Come on Plesk devs get it together.
Things get stressful, I try to pray. Not always easy, but always helps to relax and regain focus.
Nice new speed checker at fastorslow.com.
Easy way to exclude certain tests from WP Site Health: Site Health Tool Manager
Excellent (and free) tool for getting tons of site SSL infos: whynopadlock.com