WordPress.org

Ready to get started?Download WordPress

Forums

Networks for WordPress
[resolved] Delete rewrite_rules on site move (3 posts)

  1. mgburns
    Member
    Posted 1 year ago #

    One issue that I have run in to using this plugin is that when a site is moved between networks custom post type rewrite rules are not regenerated correctly, resulting in 404's for front-end CPT page requests.

    This is problematic for those of us using the move operation to launch sites from staging networks to production networks. Manually flushing permalinks after a move is tedious.

    A workaround we currently have in place is calling delete_option( 'rewrite_rules' ) in a callback for wpmu_move_site. This forces rewrite rules to be regenerated on the next page request for that site, when all CPT's are registered. The same approach is taken in core, where they call delete_option( 'rewrite_rules' ) after updating the siteurl and home options for sites that have had paths updated via wp-admin/network/site-info.php.

    While this works for us, I think it should be incorporated in to the plugin.

    http://wordpress.org/extend/plugins/networks-for-wordpress/

  2. David Dean
    Member
    Plugin Author

    Posted 1 year ago #

    Hi mgburns -

    Thanks very much for the note! I hadn't thought of that, but it's an excellent point. I'll add it to the development version and incorporate it into the next release.

    - David

  3. David Dean
    Member
    Plugin Author

    Posted 1 year ago #

    Hi mgburns -

    A fix for this is included in the latest release. Thank you again for reporting this issue!

    - David

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic