Support » Networking WordPress » New sites giving 404's/empty indexes/archives after upgrade

  • Resolved Ross Wintle


    This is a bit of a long shot, but someone may have seen it before.

    I’m helping someone out who’s got a problem with a multisite after upgrading to 3.2.1 (I’m not sure which version the upgrade was FROM).

    Sites created after the upgrade are basically giving empty queries for anything other than single posts. Categories, indexes, pages, all empty and either returning 404’s or empty lists.

    I’ve checked permalinks, and made a few tweaks, but with no improvement. I’ve re-saved permalink’s for the new sites in question to no avail.

    I’ve checked options in the database, and checked out the wp_xx_posts table too. All is good.

    I can see no differences between a site that works (created prior to the upgrade) and a site that doesn’t.

    I’ve tried doing some debugging. I can’t see any database errors, the only thing that’s odd is if I do:

    <?php print_r($_SERVER["REQUEST_URI"]); print_r( $GLOBALS['wp_query']->query ); $GLOBALS['wp_query']->get_posts(); print_r($GLOBALS['wpdb']->last_query); ?>

    at the top of the 404.php, it echoes the following query:

    SELECT wp_XX_posts.* FROM wp_XX_posts WHERE 1=1 AND wp_XX_posts.post_name = 'sample-page' AND wp_XX_posts.post_type = 'post' ORDER BY wp_XX_posts.post_date DESC

    Note the post_type = 'post' when I’m querying for a page.

    However, I get this same query on a site that works if I go get a random page on there too.

    I read something about a database collation issue and so checked my database collations – they all seem to be the same for sites that work and for sites that don’t.

    I’m pretty good at this stuff, but I’m totally stumped. Any ideas?

Viewing 6 replies - 1 through 6 (of 6 total)
  • Are these subdomains or subfolders?

    Ross Wintle


    Ah yes – the vital fact missing. They’re subfolders.

    Two things to do right away.

    1) Run a repair on your database via PHPMyAdmin. It may not need it, but you can sure try.

    2) What’s in your .htaccess? If this is happening all subsites, it’s possible there’s a corruption/missed change. Depending on how far back this was installed as (i.e. if you were on WPMU and upgraded to WordPress MultiSIte).

    Ross Wintle


    Thanks for the response – sorry it’s taken a while to get back to you, I had to deal with some other things.

    1) I did a table check and nothing was wrong.
    2) It’s not happening on all subsites, just on the ones that are created after the WP upgrade.

    I have found something different about the new sites: they don’t have entries in the wp_blog_versions table.

    Is that a known issue?

    Run a repair anyway, if you can. If everything’s okay, it’ll hurt nothing.

    You may as well try run-running the upgrade for WP while you’re at it. Doesn’t hurt anything to do, and there may be a missing file.

    Ross Wintle


    Aha. Found it.

    A dodgy, network-enabled plugin. (AStickyPostOrderER)

    Still not clear why this worked for older sites created before the upgrade.

    Oh well.

    Thanks for your help – much appreciated.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘New sites giving 404's/empty indexes/archives after upgrade’ is closed to new replies.