WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Not sure when it happened but the custom permalinks for pages on my client's Wordpress site have broken. I can fix it by reverting back to the default permalinks and then using the custom permalinks, but they break again whenever my clients edits a page. Blog posts, archives, tags, categories, and custom post types permalinks all work fine, it's only pages that 404 when using custom permalinks.

The site has an .htaccess file with 666 permissions with the following in the file:

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]

It also has mod_rewrite enabled.

Using Wordpress 3.1.3

It's not the plugins because I have disabled all of them and the permalinks for pages still don't work.

Please help.

share|improve this question
I would recommend not using 666 as a file permissions, especially if there are other users on the same server. Also rename the .htaccess to old.htaccess and click default permlinks, then click your custom structure 2x, then check if WordPress has written a new .htaccess and compare it to the old one. – Wyck Jun 18 '11 at 3:23
@Wyck I generated new .htaccess several times by doing what you said. It still 404's when I edit a page and the .htaccess file has the same code in it. The .htaccess file is currently 644. – Lindsey Salls Jun 18 '11 at 20:09
Does the same thing occur with the default twentyten theme and all plugins disabled? – Wyck Jun 19 '11 at 1:43
It works fine in the TwentyTen theme with all plugins enabled (didn't try disabled). That means there is something wrong with the theme then doesn't it? Any idea what could cause this? – Lindsey Salls Jun 20 '11 at 22:36
It's impossible to say, try contact the theme author, if you have to start looking in functions.php for anything weird. – Wyck Jun 21 '11 at 16:11

Do you have a custom post type? This is exactly the kind of behavior you will see from have a custom post type with a slug that matches the slug of your pages. For example, if you have a page called "portfolio" and a post type called "portfolio", both with a slug of "portfolio", 404s are going to be thrown for some of these.

share|improve this answer

I'm having this exact same issue! The default permalinks work fine, but when I revert to my custom structure - it breaks. No idea where to turn, a friend of mine noticed this, so I don't even know how long it's been broken.

share|improve this answer
up vote 0 down vote accepted

I was using the Custom Post Type UI Plugin and had generated the following code (which I added to the functions file) for a custom taxonomy through the plugin:

register_taxonomy( 'video_type',
    array ( 0 => 'video' ),
        'hierarchical'    => true,
        'label'           => 'Type',
        'show_ui'         => true,
        'query_var'       => true,
        'rewrite'         => array( 'slug' => '' ),
        'singular_label'  => 'video_type'

Somehow that code broke the theme. In Custom Post Type UI you can either create custom posts types and taxonomies and keep the plugin active or use the beta function to copy and paste generated code to your function file. So I ended up deleting that code and keeping the plugin active.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.