With a “mu-plugins”, the solution is…
add_action( 'wpmu_new_blog', function( $blog_id ){
switch_to_blog( $blog_id );
global $wp_rewrite;
$wp_rewrite->set_permalink_structure('/%postname%/');
$wp_rewrite->flush_rules();
restore_current_blog();
}, 10 );
Related Posts:
- How to get blog id from permalink?
- Why wordpress multisite root site showing blog prefix by force?
- Create unique alphanumeric ID on wp_insert_post
- WordPress Pages Redirecting to Root with WordPress Multisite (Sub-Directory)
- How to eliminate permalink prefix in WordPress Multisite
- Is it possible to install WordPress Multisite on a subdomain with subdirectories?
- flush_rewrite_rules on MultiSite
- WP Multisite Subdirectory Custom Permalinks 404
- Change permalink structure in all sites of a multisite
- 404 on wordpress multisite Permalink pretty URLs
- WordPress Multisite ABSPATH and get_home_path() to check for htaccess or web.config file
- In a multisite, how can I get posts from one site and display their permalinks in another site?
- Disable “similar permalink” redirect [duplicate]
- Parent/Child Relationships with Multisites?
- How to use ‘blogs.dir’ as media upload instead of ‘uploads’ directory in WordPress multisite setup
- where is permalink info stored in database?
- Passing and retrieving query vars in wordpress
- Get the current page URL (including pagination)
- How can I reverse engineer a Permalink to Find the Page?
- Mapping Domains to Permalinks (not multisite)
- How to remove dates from existing permalinks?
- Setting up WordPress with Custom Permalinks and no .htaccess File?
- How would I create a different permalink structure for pages and posts?
- My permalinks are broken! Can I use mod_rewrite to ignore a physical file?
- How to prevent the default home rewrite to a static page
- Is there an action for when permalinks are rebuilt?
- When creating a WordPress page, a “-2” suffix is added to new pages’ permalinks
- mod_rewrite enabled but Permalinks show index.php
- How to get a page url by a page id?
- Why does /wp-json/ not work on the “plain” permalink structure?
- How to change “permalink” structure in “WordPress Thesis” theme?
- Turn off %postname% auto-incrementing?
- How to get the post id from a permalink?
- Does a parent page’s post_title have to appear in a child page permalink?
- Stop redirecting to posts not in a category / duplicate slugs
- Custom Taxonomy URL
- rewrite_rule for custom post type doesn’t affect get_permalink
- Add ‘articles’ prefix before blog posts url without affecting pagination
- Custom attachment permalink structure [closed]
- WordPress not respecting template hierarchy (fetches index.php instead of single.php or page.php)
- Is there a wordpress function that I can use to retrieve the current page that is loaded?
- .htaccess file missing from WordPress install directory
- CSS not loaded when omitting www. part of URL
- Server Move: All pages leading home
- WordPress Permalink 404
- Link to the post displays ID instead of slug
- index.php is always displayed before any file on the URL
- Include Post Format in permalink
- How to get permalink using get_blog_post function in a multisite?
- Non latin post slug truncate
- Why I can’t change the permalink of a WP page?
- Page preview is shown, updating page gives 404 error
- Dynamic Template file for subpage
- How to 301 redirect from one url to another properly
- remove product-category base but still redirect to page with same permalink
- Correct permalinks and 404-error
- What would cause a theme to add extra characters to blog post links?
- Getting 404 when Access post which name start with Digit
- Advanced author permalinks
- How to check if the current page is the permalink page?
- Format HTTP links
- Change directory url to be same as page permalink?
- Some Pemalink problems, probably caused by wrong .htaccess configuration?
- Permalinks set to /%postname%/ but still have links being indexed in the form ?p=x
- WordPress author.php template does not work with custom permalink structure! Help!
- LAMP WordPress Permalinks 404 error
- Links in post content don’t work on home page
- Arabic permalink redirect to home page
- Changing permalink settings causes 404
- Issues when changing permalink Structure
- permalinks on title tag
- Non Latin page permalink problem
- Custom permalink structure for product
- index.php in URL
- Empty the_excerpt() broke the_permalink() under him?
- Permalink not changing according to post type
- How to change permalink for listings
- WordPress Pages that use Domain URL
- 404 page not found – Yet open admin page it works
- How can I have a page’s permalink include my custom post type’s slug?
- wordpress admin panel loop on nginx
- Can’t access new WP install on subdirectory
- WordPress Permalinks
- Problem with permalinks
- Find internal links to post
- How to change link of an uploaded file to the media library
- On Macbook, my permalinks with post name don’t work. Returning 404 error
- “Undefined” added to page content after google Adwords click
- WordPress pages break with custom permalink settings (theme directory not output)
- Remove /index.php from Permalink
- Image upload ruined my links
- Tag search not working after permalink structure change
- Why is there a # and other characters in URL for WordPress site?
- standard post with extra parameter brings permalink problem
- redirect old pages by .htaccess
- wp_get_attachment_url not working
- Custom permalink to make a page respond properly
- WordPress 3.1 problem, getting 404
- Redirect Loops Problems
- Custom Permalink Structure For a Specific Category