views:

92

answers:

2

Hey Guys,

I am having problems getting my Permalinks changed with my Wordpress instance. I have about 5 blog posts which were created using the default "postid" permalinks. I am now trying to change my permalink to %postname% but I cannot get it to work. Any time I change the Permalinks in Wordpress all my old posts throw 404s. I have tried 4 Wordpress Permalink plugins to resolve this issue but I cannot get any of them to work. I have also updated my blog's .htaccess file to include the necessary information. Finally I deleted all my original posts and changed the Permalink, then recreated them and it still did not work. Please help, I don't know what else to try! Thanks

+1  A: 

Be sure there is only one wordpress rewrite block in .htaccess. And you may need to go into the wp_options table in the database with phpmyadmin and clear the permalink setting there. Once in a while permalink settings get "stuck" in the wp_options table and wordpress can't write the new setting to the database, even though WP writes the changes to the .htaccess file. Database Description « WordPress Codex

Edit 3/03/10

Turned out to be mostly CentOS not playing nice with Wordpress Permalinks, but there are documented fixes via Google.

Edit 3/02/10

If your .htaccess is writable and changes are being saved and you can see them, then permalink_structure field in wp_options should not be blank. Did you disable and delete all plugins relating to permalinks and start from scratch? Are you on Windows or Linux hosting?

songdogtech
Thanks songdogtech, I confirmed that I do only have one rewrite blog in my .htaccess. I even cleaned it out and let Dean's Permalink plugin edit it for me which is a plugin everyone says works. I also confirmed last night that my permalink_structure field in wp_options is currently blank. Not sure if this is correct or not..
roacha
See edit above...
songdogtech
Here is an example of my .htaccess file after I change to my custom %postname% permalink. All plugins are disabled..# BEGIN WordPress<IfModule mod_rewrite.c>RewriteEngine OnRewriteBase /blog/RewriteCond %{REQUEST_FILENAME} !-fRewriteCond %{REQUEST_FILENAME} !-dRewriteRule . /blog/index.php [L]</IfModule># END WordPressAlso I looked at my wp_options permalink_structure and it shows as: /%postname% now. I am running Linux. Could it be my SymLinks,etc settings in my httpd.conf??
roacha
Is your wordpress install in /blog/ or in the root of your server? Did you change anything in httpd.conf? Is this a local Linux install or your own server at a web host?
songdogtech
Yes, my Wordpress install is in /blog/ the root of my server is my main website. I have tuned/customized the httpd.conf over time. I have my own dedicated server running CentOS.
roacha
Now we're getting somewhere; you should have said you've been tweaking httpd.conf in the beginning. Revert httpd.conf to the original and Google "wordpress permalinks CentOS" to see that Wordpress permalinks don't play nice with CentOS out of the box and what you need to edit in httpd.conf.
songdogtech
One final question and I will close this question out. I had to change the main Directory's AllowOverride to All to resolve the issue. In Apache tuning guides they say to turn this to Off because it adds an extra check every request to see if there is an .htaccess file which slows performance. I tried adding a specific 'Directory' for /blog/ and enable AllowOverride All in this directory only and disabled it in the main Directory. But the Permalinks failed. Is there a solution in which I can improve performance for the overall website and just enable it for /blog? Thanks again!
roacha
AllowOverride settings will matter if you're getting a million page views a month; I'm sure it's overkill at this point. Post a new question on it.
songdogtech
A: 

I suggest dont use any wordpress plugin for permalink because wordpress has in build permalink support. It is also not dependent on windows or linux hosting server. Permalink is dependent on apache web server and mod_rewrite module. If you are using the dedicated server for hosing then dont worry just check your httpd.conf file which is apache configuration file. check the blocks, find following line and comment that.

#AllowOverride None

and put following lines

AllowOverride all
Options Indexes FollowSymLinks

this will solve your issue. check .htaccess file also and check the settings.

wordpressapi