WordPress.org

Ready to get started?Download WordPress

Forums

404 errors after update. Need to flush rewrite rules network-wide (34 posts)

  1. agreenerbean
    Member
    Posted 3 years ago #

    After updating our WP multisite http://blogs.evergreen.edu/ from 3.0.1 to 3.0.4 subsites get 404 errors when accessing post and category pages (front page and pages work fine). This forum post identified a solution (resave permalink settings) however we have over 1100 sites where this needs to happen. I've looked for plugins that will flush the rewrite rules network-wide but the closest I've found is YD Network-wide Options that will flush rewrite rules on new blogs (not existing ones). Any ideas?

  2. I know they're stored in wp_#_options under rewrite_rules and I know there's an action called flush_rewrite_rules()

    What I don't know is how to apply that. I want to spit-ball and say that making a plugin for mu-plugins that reset everything when it was hit would do it, but you'd still need to visit all of your 1100 sites.

  3. Joerg
    Member
    Posted 3 years ago #

    I do have the same thing on my multiblog, when I update something like a theme or plugin and update my subblogs everything works fine but when clicking on a title the post is not showing and I get a 404 error until I update the permalinks once to each subblog after this everything is back to normal. How can I prevent this? It's time consuming and annoying to update the permalinks after each update at any subblog. Any automation or things that need to be adjusted?

  4. Joerg
    Member
    Posted 3 years ago #

    Ok I saw on several posts that the .htaccess file might cause the problem this is why I'm posting my setting here:

    # BEGIN WordPress
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    
    # uploaded files
    RewriteRule ^([_0-9a-zA-Z-]+/)?files/(.+) wp-includes/ms-files.php?file=$2 [L]
    
    # add a trailing slash to /wp-admin
    RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]
    
    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^ - [L]
    RewriteRule  ^[_0-9a-zA-Z-]+/(wp-(content|admin|includes).*) $1 [L]
    RewriteRule  ^[_0-9a-zA-Z-]+/(.*\.php)$ $1 [L]
    RewriteRule . index.php [L]
    # END WordPress

    alas my .htaccess seems to be ok to me.

    I'm using the sub folder setting for my multisite with the Domain-Mapping-Plugin.

    Will this ever be fixed?

  5. It doesn't happen to everyone, is the problem. Actually, it's pretty freakin RARE. At best guess, it's a combo of server + plugins that causes it :(

  6. Joerg
    Member
    Posted 3 years ago #

    Any more information about my host for example that would help? Or which plugins I have installed? That would help?

  7. Sergey Biryukov
    WordPress Dev
    Posted 3 years ago #

    What is the rewrite_rules value in the options table of a broken blog?

  8. Joerg
    Member
    Posted 3 years ago #

    It is grayed out and says SERIALIZED DATA, but this is also showing up at those sub blogs that work fine.
    Is it right that you meant the value of the rewrite_rules at this page?
    -> wp-admin/options.php

  9. Sergey Biryukov
    WordPress Dev
    Posted 3 years ago #

    Close, but not exactly. Might be helpful if you find its actual value in phpMyAdmin.

  10. Joerg
    Member
    Posted 3 years ago #

    oh sorry here it is whats stored in the DB:
    a:73:{s:53:"blog/ngg_tag/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$";s:46:"index.php?ngg_tag=$matches[1]&feed=$matches[2]";s:48:"blog/ngg_tag/([^/]+)/(feed|rdf|rss|rss2|atom)/?$";s:46:"index.php?ngg_tag=$matches[1]&feed=$matches[2]";s:41:"blog/ngg_tag/([^/]+)/page/?([0-9]{1,})/?$";s:47:"index.php?ngg_tag=$matches[1]&paged=$matches[2]";s:23:"blog/ngg_tag/([^/]+)/?$";s:29:"index.php?ngg_tag=$matches[1]";s:14:".*wp-atom.php$";s:19:"index.php?feed=atom";s:13:".*wp-rdf.php$";s:18:"index.php?feed=rdf";s:13:".*wp-rss.php$";s:18:"index.php?feed=rss";s:14:".*wp-rss2.php$";s:19:"index.php?feed=rss2";s:14:".*wp-feed.php$";s:19:"index.php?feed=feed";s:22:".*wp-commentsrss2.php$";s:34:"index.php?feed=rss2&withcomments=1";s:16:".*wp-signup.php$";s:21:"index.php?signup=true";s:18:".*wp-activate.php$";s:23:"index.php?activate=true";s:32:"eine-seite/attachment/([^/]+)/?$";s:32:"index.php?attachment=$matches[1]";s:42:"eine-seite/attachment/([^/]+)/trackback/?$";s:37:"index.php?attachment=$matches[1]&tb=1";s:62:"eine-seite/attachment/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$";s:49:"index.php?attachment=$matches[1]&feed=$matches[2]";s:57:"eine-seite/attachment/([^/]+)/(feed|rdf|rss|rss2|atom)/?$";s:49:"index.php?attachment=$matches[1]&feed=$matches[2]";s:57:"eine-seite/attachment/([^/]+)/comment-page-([0-9]{1,})/?$";s:50:"index.php?attachment=$matches[1]&cpage=$matches[2]";s:25:"(eine-seite)/trackback/?$";s:35:"index.php?pagename=$matches[1]&tb=1";s:45:"(eine-seite)/feed/(feed|rdf|rss|rss2|atom)/?$";s:47:"index.php?pagename=$matches[1]&feed=$matches[2]";s:40:"(eine-seite)/(feed|rdf|rss|rss2|atom)/?$";s:47:"index.php?pagename=$matches[1]&feed=$matches[2]";s:33:"(eine-seite)/page/?([0-9]{1,})/?$";s:48:"index.php?pagename=$matches[1]&paged=$matches[2]";s:40:"(eine-seite)/comment-page-([0-9]{1,})/?$";s:48:"index.php?pagename=$matches[1]&cpage=$matches[2]";s:25:"(eine-seite)(/[0-9]+)?/?$";s:47:"index.php?pagename=$matches[1]&page=$matches[2]";s:32:"feed/(feed|rdf|rss|rss2|atom)/?$";s:27:"index.php?&feed=$matches[1]";s:27:"(feed|rdf|rss|rss2|atom)/?$";s:27:"index.php?&feed=$matches[1]";s:20:"page/?([0-9]{1,})/?$";s:28:"index.php?&paged=$matches[1]";s:41:"comments/feed/(feed|rdf|rss|rss2|atom)/?$";s:42:"index.php?&feed=$matches[1]&withcomments=1";s:36:"comments/(feed|rdf|rss|rss2|atom)/?$";s:42:"index.php?&feed=$matches[1]&withcomments=1";s:29:"comments/page/?([0-9]{1,})/?$";s:28:"index.php?&paged=$matches[1]";s:44:"search/(.+)/feed/(feed|rdf|rss|rss2|atom)/?$";s:40:"index.php?s=$matches[1]&feed=$matches[2]";s:39:"search/(.+)/(feed|rdf|rss|rss2|atom)/?$";s:40:"index.php?s=$matches[1]&feed=$matches[2]";s:32:"search/(.+)/page/?([0-9]{1,})/?$";s:41:"index.php?s=$matches[1]&paged=$matches[2]";s:14:"search/(.+)/?$";s:23:"index.php?s=$matches[1]";s:52:"blog/category/(.+?)/feed/(feed|rdf|rss|rss2|atom)/?$";s:52:"index.php?category_name=$matches[1]&feed=$matches[2]";s:47:"blog/category/(.+?)/(feed|rdf|rss|rss2|atom)/?$";s:52:"index.php?category_name=$matches[1]&feed=$matches[2]";s:40:"blog/category/(.+?)/page/?([0-9]{1,})/?$";s:53:"index.php?category_name=$matches[1]&paged=$matches[2]";s:22:"blog/category/(.+?)/?$";s:35:"index.php?category_name=$matches[1]";s:47:"blog/tag/(.+?)/feed/(feed|rdf|rss|rss2|atom)/?$";s:42:"index.php?tag=$matches[1]&feed=$matches[2]";s:42:"blog/tag/(.+?)/(feed|rdf|rss|rss2|atom)/?$";s:42:"index.php?tag=$matches[1]&feed=$matches[2]";s:35:"blog/tag/(.+?)/page/?([0-9]{1,})/?$";s:43:"index.php?tag=$matches[1]&paged=$matches[2]";s:17:"blog/tag/(.+?)/?$";s:25:"index.php?tag=$matches[1]";s:52:"blog/author/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$";s:50:"index.php?author_name=$matches[1]&feed=$matches[2]";s:47:"blog/author/([^/]+)/(feed|rdf|rss|rss2|atom)/?$";s:50:"index.php?author_name=$matches[1]&feed=$matches[2]";s:40:"blog/author/([^/]+)/page/?([0-9]{1,})/?$";s:51:"index.php?author_name=$matches[1]&paged=$matches[2]";s:22:"blog/author/([^/]+)/?$";s:33:"index.php?author_name=$matches[1]";s:74:"blog/([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/feed/(feed|rdf|rss|rss2|atom)/?$";s:80:"index.php?year=$matches[1]&monthnum=$matches[2]&day=$matches[3]&feed=$matches[4]";s:69:"blog/([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/(feed|rdf|rss|rss2|atom)/?$";s:80:"index.php?year=$matches[1]&monthnum=$matches[2]&day=$matches[3]&feed=$matches[4]";s:62:"blog/([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/page/?([0-9]{1,})/?$";s:81:"index.php?year=$matches[1]&monthnum=$matches[2]&day=$matches[3]&paged=$matches[4]";s:44:"blog/([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/?$";s:63:"index.php?year=$matches[1]&monthnum=$matches[2]&day=$matches[3]";s:61:"blog/([0-9]{4})/([0-9]{1,2})/feed/(feed|rdf|rss|rss2|atom)/?$";s:64:"index.php?year=$matches[1]&monthnum=$matches[2]&feed=$matches[3]";s:56:"blog/([0-9]{4})/([0-9]{1,2})/(feed|rdf|rss|rss2|atom)/?$";s:64:"index.php?year=$matches[1]&monthnum=$matches[2]&feed=$matches[3]";s:49:"blog/([0-9]{4})/([0-9]{1,2})/page/?([0-9]{1,})/?$";s:65:"index.php?year=$matches[1]&monthnum=$matches[2]&paged=$matches[3]";s:31:"blog/([0-9]{4})/([0-9]{1,2})/?$";s:47:"index.php?year=$matches[1]&monthnum=$matches[2]";s:48:"blog/([0-9]{4})/feed/(feed|rdf|rss|rss2|atom)/?$";s:43:"index.php?year=$matches[1]&feed=$matches[2]";s:43:"blog/([0-9]{4})/(feed|rdf|rss|rss2|atom)/?$";s:43:"index.php?year=$matches[1]&feed=$matches[2]";s:36:"blog/([0-9]{4})/page/?([0-9]{1,})/?$";s:44:"index.php?year=$matches[1]&paged=$matches[2]";s:18:"blog/([0-9]{4})/?$";s:26:"index.php?year=$matches[1]";s:32:"blog/[^/]+/attachment/([^/]+)/?$";s:32:"index.php?attachment=$matches[1]";s:42:"blog/[^/]+/attachment/([^/]+)/trackback/?$";s:37:"index.php?attachment=$matches[1]&tb=1";s:62:"blog/[^/]+/attachment/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$";s:49:"index.php?attachment=$matches[1]&feed=$matches[2]";s:57:"blog/[^/]+/attachment/([^/]+)/(feed|rdf|rss|rss2|atom)/?$";s:49:"index.php?attachment=$matches[1]&feed=$matches[2]";s:57:"blog/[^/]+/attachment/([^/]+)/comment-page-([0-9]{1,})/?$";s:50:"index.php?attachment=$matches[1]&cpage=$matches[2]";s:25:"blog/([^/]+)/trackback/?$";s:31:"index.php?name=$matches[1]&tb=1";s:45:"blog/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$";s:43:"index.php?name=$matches[1]&feed=$matches[2]";s:40:"blog/([^/]+)/(feed|rdf|rss|rss2|atom)/?$";s:43:"index.php?name=$matches[1]&feed=$matches[2]";s:33:"blog/([^/]+)/page/?([0-9]{1,})/?$";s:44:"index.php?name=$matches[1]&paged=$matches[2]";s:40:"blog/([^/]+)/comment-page-([0-9]{1,})/?$";s:44:"index.php?name=$matches[1]&cpage=$matches[2]";s:25:"blog/([^/]+)(/[0-9]+)?/?$";s:43:"index.php?name=$matches[1]&page=$matches[2]";s:21:"blog/[^/]+/([^/]+)/?$";s:32:"index.php?attachment=$matches[1]";s:31:"blog/[^/]+/([^/]+)/trackback/?$";s:37:"index.php?attachment=$matches[1]&tb=1";s:51:"blog/[^/]+/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$";s:49:"index.php?attachment=$matches[1]&feed=$matches[2]";s:46:"blog/[^/]+/([^/]+)/(feed|rdf|rss|rss2|atom)/?$";s:49:"index.php?attachment=$matches[1]&feed=$matches[2]";s:46:"blog/[^/]+/([^/]+)/comment-page-([0-9]{1,})/?$";s:50:"index.php?attachment=$matches[1]&cpage=$matches[2]";}

  11. Joerg
    Member
    Posted 3 years ago #

    after updating the permalinks manually the value looks like this:

    a:75:{s:48:"ngg_tag/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$";s:46:"index.php?ngg_tag=$matches[1]&feed=$matches[2]";s:43:"ngg_tag/([^/]+)/(feed|rdf|rss|rss2|atom)/?$";s:46:"index.php?ngg_tag=$matches[1]&feed=$matches[2]";s:36:"ngg_tag/([^/]+)/page/?([0-9]{1,})/?$";s:47:"index.php?ngg_tag=$matches[1]&paged=$matches[2]";s:18:"ngg_tag/([^/]+)/?$";s:29:"index.php?ngg_tag=$matches[1]";s:12:"robots\.txt$";s:18:"index.php?robots=1";s:14:".*wp-atom.php$";s:19:"index.php?feed=atom";s:13:".*wp-rdf.php$";s:18:"index.php?feed=rdf";s:13:".*wp-rss.php$";s:18:"index.php?feed=rss";s:14:".*wp-rss2.php$";s:19:"index.php?feed=rss2";s:14:".*wp-feed.php$";s:19:"index.php?feed=feed";s:22:".*wp-commentsrss2.php$";s:34:"index.php?feed=rss2&withcomments=1";s:32:"feed/(feed|rdf|rss|rss2|atom)/?$";s:27:"index.php?&feed=$matches[1]";s:27:"(feed|rdf|rss|rss2|atom)/?$";s:27:"index.php?&feed=$matches[1]";s:20:"page/?([0-9]{1,})/?$";s:28:"index.php?&paged=$matches[1]";s:41:"comments/feed/(feed|rdf|rss|rss2|atom)/?$";s:42:"index.php?&feed=$matches[1]&withcomments=1";s:36:"comments/(feed|rdf|rss|rss2|atom)/?$";s:42:"index.php?&feed=$matches[1]&withcomments=1";s:29:"comments/page/?([0-9]{1,})/?$";s:28:"index.php?&paged=$matches[1]";s:44:"search/(.+)/feed/(feed|rdf|rss|rss2|atom)/?$";s:40:"index.php?s=$matches[1]&feed=$matches[2]";s:39:"search/(.+)/(feed|rdf|rss|rss2|atom)/?$";s:40:"index.php?s=$matches[1]&feed=$matches[2]";s:32:"search/(.+)/page/?([0-9]{1,})/?$";s:41:"index.php?s=$matches[1]&paged=$matches[2]";s:14:"search/(.+)/?$";s:23:"index.php?s=$matches[1]";s:47:"category/(.+?)/feed/(feed|rdf|rss|rss2|atom)/?$";s:52:"index.php?category_name=$matches[1]&feed=$matches[2]";s:42:"category/(.+?)/(feed|rdf|rss|rss2|atom)/?$";s:52:"index.php?category_name=$matches[1]&feed=$matches[2]";s:35:"category/(.+?)/page/?([0-9]{1,})/?$";s:53:"index.php?category_name=$matches[1]&paged=$matches[2]";s:17:"category/(.+?)/?$";s:35:"index.php?category_name=$matches[1]";s:42:"tag/(.+?)/feed/(feed|rdf|rss|rss2|atom)/?$";s:42:"index.php?tag=$matches[1]&feed=$matches[2]";s:37:"tag/(.+?)/(feed|rdf|rss|rss2|atom)/?$";s:42:"index.php?tag=$matches[1]&feed=$matches[2]";s:30:"tag/(.+?)/page/?([0-9]{1,})/?$";s:43:"index.php?tag=$matches[1]&paged=$matches[2]";s:12:"tag/(.+?)/?$";s:25:"index.php?tag=$matches[1]";s:47:"author/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$";s:50:"index.php?author_name=$matches[1]&feed=$matches[2]";s:42:"author/([^/]+)/(feed|rdf|rss|rss2|atom)/?$";s:50:"index.php?author_name=$matches[1]&feed=$matches[2]";s:35:"author/([^/]+)/page/?([0-9]{1,})/?$";s:51:"index.php?author_name=$matches[1]&paged=$matches[2]";s:17:"author/([^/]+)/?$";s:33:"index.php?author_name=$matches[1]";s:69:"([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/feed/(feed|rdf|rss|rss2|atom)/?$";s:80:"index.php?year=$matches[1]&monthnum=$matches[2]&day=$matches[3]&feed=$matches[4]";s:64:"([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/(feed|rdf|rss|rss2|atom)/?$";s:80:"index.php?year=$matches[1]&monthnum=$matches[2]&day=$matches[3]&feed=$matches[4]";s:57:"([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/page/?([0-9]{1,})/?$";s:81:"index.php?year=$matches[1]&monthnum=$matches[2]&day=$matches[3]&paged=$matches[4]";s:39:"([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/?$";s:63:"index.php?year=$matches[1]&monthnum=$matches[2]&day=$matches[3]";s:56:"([0-9]{4})/([0-9]{1,2})/feed/(feed|rdf|rss|rss2|atom)/?$";s:64:"index.php?year=$matches[1]&monthnum=$matches[2]&feed=$matches[3]";s:51:"([0-9]{4})/([0-9]{1,2})/(feed|rdf|rss|rss2|atom)/?$";s:64:"index.php?year=$matches[1]&monthnum=$matches[2]&feed=$matches[3]";s:44:"([0-9]{4})/([0-9]{1,2})/page/?([0-9]{1,})/?$";s:65:"index.php?year=$matches[1]&monthnum=$matches[2]&paged=$matches[3]";s:26:"([0-9]{4})/([0-9]{1,2})/?$";s:47:"index.php?year=$matches[1]&monthnum=$matches[2]";s:43:"([0-9]{4})/feed/(feed|rdf|rss|rss2|atom)/?$";s:43:"index.php?year=$matches[1]&feed=$matches[2]";s:38:"([0-9]{4})/(feed|rdf|rss|rss2|atom)/?$";s:43:"index.php?year=$matches[1]&feed=$matches[2]";s:31:"([0-9]{4})/page/?([0-9]{1,})/?$";s:44:"index.php?year=$matches[1]&paged=$matches[2]";s:13:"([0-9]{4})/?$";s:26:"index.php?year=$matches[1]";s:58:"[0-9]{4}/[0-9]{1,2}/[0-9]{1,2}/[^/]+/attachment/([^/]+)/?$";s:32:"index.php?attachment=$matches[1]";s:68:"[0-9]{4}/[0-9]{1,2}/[0-9]{1,2}/[^/]+/attachment/([^/]+)/trackback/?$";s:37:"index.php?attachment=$matches[1]&tb=1";s:88:"[0-9]{4}/[0-9]{1,2}/[0-9]{1,2}/[^/]+/attachment/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$";s:49:"index.php?attachment=$matches[1]&feed=$matches[2]";s:83:"[0-9]{4}/[0-9]{1,2}/[0-9]{1,2}/[^/]+/attachment/([^/]+)/(feed|rdf|rss|rss2|atom)/?$";s:49:"index.php?attachment=$matches[1]&feed=$matches[2]";s:83:"[0-9]{4}/[0-9]{1,2}/[0-9]{1,2}/[^/]+/attachment/([^/]+)/comment-page-([0-9]{1,})/?$";s:50:"index.php?attachment=$matches[1]&cpage=$matches[2]";s:57:"([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/([^/]+)/trackback/?$";s:85:"index.php?year=$matches[1]&monthnum=$matches[2]&day=$matches[3]&name=$matches[4]&tb=1";s:77:"([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$";s:97:"index.php?year=$matches[1]&monthnum=$matches[2]&day=$matches[3]&name=$matches[4]&feed=$matches[5]";s:72:"([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/([^/]+)/(feed|rdf|rss|rss2|atom)/?$";s:97:"index.php?year=$matches[1]&monthnum=$matches[2]&day=$matches[3]&name=$matches[4]&feed=$matches[5]";s:65:"([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/([^/]+)/page/?([0-9]{1,})/?$";s:98:"index.php?year=$matches[1]&monthnum=$matches[2]&day=$matches[3]&name=$matches[4]&paged=$matches[5]";s:72:"([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/([^/]+)/comment-page-([0-9]{1,})/?$";s:98:"index.php?year=$matches[1]&monthnum=$matches[2]&day=$matches[3]&name=$matches[4]&cpage=$matches[5]";s:57:"([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/([^/]+)(/[0-9]+)?/?$";s:97:"index.php?year=$matches[1]&monthnum=$matches[2]&day=$matches[3]&name=$matches[4]&page=$matches[5]";s:47:"[0-9]{4}/[0-9]{1,2}/[0-9]{1,2}/[^/]+/([^/]+)/?$";s:32:"index.php?attachment=$matches[1]";s:57:"[0-9]{4}/[0-9]{1,2}/[0-9]{1,2}/[^/]+/([^/]+)/trackback/?$";s:37:"index.php?attachment=$matches[1]&tb=1";s:77:"[0-9]{4}/[0-9]{1,2}/[0-9]{1,2}/[^/]+/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$";s:49:"index.php?attachment=$matches[1]&feed=$matches[2]";s:72:"[0-9]{4}/[0-9]{1,2}/[0-9]{1,2}/[^/]+/([^/]+)/(feed|rdf|rss|rss2|atom)/?$";s:49:"index.php?attachment=$matches[1]&feed=$matches[2]";s:72:"[0-9]{4}/[0-9]{1,2}/[0-9]{1,2}/[^/]+/([^/]+)/comment-page-([0-9]{1,})/?$";s:50:"index.php?attachment=$matches[1]&cpage=$matches[2]";s:64:"([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/comment-page-([0-9]{1,})/?$";s:81:"index.php?year=$matches[1]&monthnum=$matches[2]&day=$matches[3]&cpage=$matches[4]";s:51:"([0-9]{4})/([0-9]{1,2})/comment-page-([0-9]{1,})/?$";s:65:"index.php?year=$matches[1]&monthnum=$matches[2]&cpage=$matches[3]";s:38:"([0-9]{4})/comment-page-([0-9]{1,})/?$";s:44:"index.php?year=$matches[1]&cpage=$matches[2]";s:25:".+?/attachment/([^/]+)/?$";s:32:"index.php?attachment=$matches[1]";s:35:".+?/attachment/([^/]+)/trackback/?$";s:37:"index.php?attachment=$matches[1]&tb=1";s:55:".+?/attachment/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$";s:49:"index.php?attachment=$matches[1]&feed=$matches[2]";s:50:".+?/attachment/([^/]+)/(feed|rdf|rss|rss2|atom)/?$";s:49:"index.php?attachment=$matches[1]&feed=$matches[2]";s:50:".+?/attachment/([^/]+)/comment-page-([0-9]{1,})/?$";s:50:"index.php?attachment=$matches[1]&cpage=$matches[2]";s:18:"(.+?)/trackback/?$";s:35:"index.php?pagename=$matches[1]&tb=1";s:38:"(.+?)/feed/(feed|rdf|rss|rss2|atom)/?$";s:47:"index.php?pagename=$matches[1]&feed=$matches[2]";s:33:"(.+?)/(feed|rdf|rss|rss2|atom)/?$";s:47:"index.php?pagename=$matches[1]&feed=$matches[2]";s:26:"(.+?)/page/?([0-9]{1,})/?$";s:48:"index.php?pagename=$matches[1]&paged=$matches[2]";s:33:"(.+?)/comment-page-([0-9]{1,})/?$";s:48:"index.php?pagename=$matches[1]&cpage=$matches[2]";s:18:"(.+?)(/[0-9]+)?/?$";s:47:"index.php?pagename=$matches[1]&page=$matches[2]";}

  12. Andrew Nacin
    Lead Developer
    Posted 3 years ago #

    Hi YogieAnamCara,

    I'd love to track this down. Let me make some guesses based on what I saw.

    The second set of rules did come from the main site, but it doesn't at all appear that the first did.

    I imagine that ngg_tag is the name of the site. Additionally, eine-seite is the slug of a page, and you're also running /blog/%postname%/ as a permalink structure.

    How close am I? What am I wrong about? (Probably most of it -- I just need some answers.)

    Nacin

  13. Sergey Biryukov
    WordPress Dev
    Posted 3 years ago #

    I imagine that ngg_tag is the name of the site.

    It looks like a taxonomy added by NextGEN Gallery plugin, FWIW:

    // Register the NextGEN taxonomy
    $args = array(
    	'label' => __('Picture tag', 'nggallery'),
    	'template' => __('Picture tag: %2$l.', 'nggallery'),
    	'helps' => __('Separate picture tags with commas.', 'nggallery'),
    	'sort' => true,
    	'args' => array('orderby' => 'term_order')
    	);
    
    register_taxonomy( 'ngg_tag', 'nggallery', $args );
  14. Joerg
    Member
    Posted 3 years ago #

    Hi Nacin,

    actually the first set I posted is the one that was written by the root site I suppose. As after I ran the blogs update a click on any post title brought up an 404 error.

    Recognized that I went to the sub blog with the 404 errors. I went to the permalink structure and hit update and at the sub blog the 404 error were gone. The changes that were made can be seen in my second dump out of the DB.

    ngg_tag is simply something from the NextGen Gallery Plugin.

    the /%postname%/ is the permalink from the root blog and the root blog is not in use respectively it only has a site and a post nothing more.

    the sub blogs permalink structure ist year, month and postname.

    /(eine-seite)/ is I suppose from the root site /wp-admin/ms-options.php page and seems to be the slug for the first page setting here, so when creating a new sub blog this is taken from the settings there right?
    Or this the choosen translation for /blog/ as the blogs site name or slug? (Not my translation!)
    What pops up into my mind with that, is it possible that it has to do something with the WP translation packages as I have the German WP package as root installed?

    Joerg

  15. Joerg
    Member
    Posted 3 years ago #

    Just to mention the 404 errors also exist after any update in any sub blogs where the NextGen Gallery Plugin is not activated!

  16. dscottS3
    Member
    Posted 3 years ago #

    For those that may still have the issue of needing to update their sub-blogs - I found this to work perfect for me. It plays off of the response from Ipstenu. I created a MU Plugin:

    [Code moderated as per the Forum Rules. Please use the pastebin]

    The update_siteurl function was so I can include https prefix on all of my sites. You can remove the update_blog_option function and you should be fine. Just run it once and you're good to go! Hopefully...!

    Hope this helps! Im running 3.0.4

  17. Joerg
    Member
    Posted 3 years ago #

    Can I download the plugin anywhere?

  18. dscottS3
    Member
    Posted 3 years ago #

    Didn't know I violated the Forum Rules so here is the code:

    http://wordpress.pastebin.com/8L0RBE9B

    In your wp-content directory, create a folder called mu-plugins. Create a PHP file with the code from above upload it mu-plugins. This will automatically execute the plugin when someone visits the site (the dashboard - i think). Once its executed, just remove the file and you'll be good to go.

  19. Joerg
    Member
    Posted 3 years ago #

    Thank you so much!

    How does the plugin work and what will it do?
    Why to remove it after visiting the dashboard?
    Do I need to visit the roots dashboard or each dashboard of any sub blog?
    Will this be implemented in the future updates of WP?

    Sorry for asking you so much!? :)

  20. dscottS3
    Member
    Posted 3 years ago #

    The plugin works by grabbing all of your blogs, "switching" to that blog and flushing the rewrite rules for the blog, then "switching" back to the current blog you're logged into. It does this to EVERY blog on your MS network.

    The plugin runs automatically (mu-plugins = Must Use Plugins) when one of your sites dashboards are visited. Once this happens, the plugin will loop through all of your blogs and flush the rewrite rules automatically. Therefore no need to visit each sub blog individually. Also, that plugin updates the site url to include https prefix, if you do not need that, delete lines 19 and 20.

    I recommend removing the plugin after its ran because if not it will run every time one of you sites has a visitor to the dashboard. So if you had 100 visitors at once that script would loop through all 1100 sites 100 times! Get what i'm saying?

    Im not sure if this will be implemented or not! I couldn't find a plugin to do it so I had to write one that did. I will however polish it a little more and submit it in hopes of it being included in future versions or as a downloadable plugin.

    BTW - I updated the plugin by adding a filter that will only execute the function when you're redirected to the dashboard after logging in.

    http://wordpress.pastebin.com/aWVg18cU

  21. Joerg
    Member
    Posted 3 years ago #

    Again thank you so much!

    I think it would be great to have this as a downloadable plugin. With an option that it only would run if necessary or when clicking on an button at the super admin menu item. Then the https feature could also be set as an option :)

    Sorry I'm not aware of any programming skills to that, so I could not help. I'm not even knowing if this would be feasible.

    Cheers
    Yogie

  22. dscottS3
    Member
    Posted 3 years ago #

    No problem. I hope this helps for you as it did for me.

  23. dscottS3 - Does it do it for ALL sites or just the one visited?

    I mean, if you have 500 sites, you'd still need to hit up all the 500 sites to clear them all, right?

  24. dscottS3
    Member
    Posted 3 years ago #

    @Ipstenu It will grab every blog in your network and flush all of their rewrite rules. However, you have to execute the plugin by logging into your dashboard - as it is hooked to run when you're redirected to the dashboard. But to better answer your question - no, you DO NOT have to visit each site separately.

  25. Excellent :) Thanks.

  26. @yoige - there's alreayd a plugin similar to this to do mass actions across the network.
    http://plugins.paidtoblog.com/wpmu-power-tools/

    Flush rewrite rules is a low use case. ;)

  27. Joerg
    Member
    Posted 3 years ago #

    @dscottS3 unfortunately it seems not to work for me, I also tried to remove the filter so it executes any time I load the dashboard, but after an update of any kind of plugin I get those 404 errors on my sub blogs.

    @Andrea_r mhmh what are the power tools do? Do they include a flush of the rewrite rules?

  28. dscottS3
    Member
    Posted 3 years ago #

    @Yogie I've modified the code just a bit. You can find the updated code below. I had to modify for another instance of WP MS that I manage. It may or may not work. Just thought I'd throw it out there anyway...

    http://pastie.org/1485455

    --Update--
    Another thing that I noticed is that an affected sites dashboard index has to be visited before it will rewrite flush will take place. IDK why, but this happened to me this time around.

  29. Sergey Biryukov
    WordPress Dev
    Posted 3 years ago #

    Trying to summarize on the ticket:
    http://core.trac.wordpress.org/ticket/16201#comment:8

    Any more information about my host for example that would help? Or which plugins I have installed? That would help?

    The list of plugins would probably help. Have you tried disabling them before update to eliminate as a possible source?

  30. Joerg
    Member
    Posted 3 years ago #

    @dscottS3

    I'm sorry the new code seems not to work for me either!

Topic Closed

This topic has been closed to new replies.

About this Topic