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

After updating my reading settings on my multisites, I get 404 errors on all my pages.

The only way to fix the issue is by reverting the database to previous version, that is the only way it can be fixed.

I dont think you get this error if the post type is empty, I think it needs some posts adding to it.

After painstaking process of elimination via dropping databases and re uploading a 100 times whilst removing functions one by one, I found the function causing the issue...

        'label' => 'Individuals',
        'description' => '',
        'public' => true,
        'show_ui' => true,
        'show_in_menu' => true,
        'capability_type' => 'post',
        'hierarchical' => false,
        'rewrite' => array(
            'slug' => ''
        'query_var' => true,
        'exclude_from_search' => false,
        'supports' => array(
        'taxonomies' => array(
        'labels' => array (
            'name' => 'Individuals',
            'singular_name' => 'Individual',
            'menu_name' => 'Individuals',
            'add_new' => 'Add Individual',
            'add_new_item' => 'Add New Individual',
            'edit' => 'Edit',
            'edit_item' => 'Edit Individual',
            'new_item' => 'New Individual',
            'view' => 'View Individual',
            'view_item' => 'View Individual',
            'search_items' => 'Search Individuals',
            'not_found' => 'No Individuals Found',
            'not_found_in_trash' => 'No Individuals Found in Trash',
            'parent' => 'Parent Individual'
        'menu_icon' => get_bloginfo('template_url').'/images/menu_icon.png'
register_taxonomy('individual-group',array (
  0 => 'individual',
),array( 'hierarchical' => true, 'label' => 'Group Number','show_ui' => true,'query_var' => true,'rewrite' => array('slug' => ''),'singular_label' => 'Group Number') );
register_taxonomy('individual-role',array (
  0 => 'individual',
),array( 'hierarchical' => true, 'label' => 'Role','show_ui' => true,'query_var' => true,'rewrite' => array('slug' => ''),'singular_label' => 'Role') );
register_taxonomy('individual-territory',array (
  0 => 'individual',
),array( 'hierarchical' => true, 'label' => 'Territory','show_ui' => true,'query_var' => true,'rewrite' => array('slug' => ''),'singular_label' => 'Territory') );

My multisite runs absolutely fine, until randomly (possibly because of updating a setting), I get 404 errors on all pages.

I can force create the 404 error by updating the reading settings to a static page... http://i.imgur.com/RRqBU1m.png

Within the reading panel I can choose any page template, or try to revert "Your Latest Posts" on this page, and the 404 occurs.

If you switch to another theme, the 404 error is carried over, but weirdly you just get the home page for every single page - so the problem must be in the db.

The only way I get rid of the 404 error is by reseting my database to a previous version before the 404 error has occurred

This is how i found what was causing it step by step...

  1. I deleted my functions.php contents. And updated my reading settings. The site works fine! No 404 error.
  2. I re added my functions.php contents. Still no error.
  3. I updated my reading settings to force create the error - and yes, I got the 404.
  4. I reset my database, and 404 has gone.
  5. I deleted all my function contents, added them one by one, refreshing my website each time. I did NOT get a 404, site works fine.
  6. I deleted all my functions again, added them one by one, but each time I added one, I updated my reading settings, and when I add the function below, I got the 404, see below what is causing it...
  7. I tested this on its own in twentytwelve theme (with posts added to individual post type) with reset database and the error still occurs.

How can this function be fixed as its prooving to be a nightmare.

Thanks in advance.

share|improve this question

Your Answer


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

Browse other questions tagged or ask your own question.