• Like many new multisite users, I’m would really like to remove “blog” from the URL of my primary site. However, trying to change the permalinks settings to just /%postname%/ seems to have lots of downsides (it gets reset; there are a lot of broken links all over the site, since we link back to our own posts frequently). So, I would like to just change the word “blog” to something more benign, like “1” or “home.”

    I found this solution, which suggests going into the options-permalink.php to change the word “blog”:
    https://wordpress.stackexchange.com/questions/131582/wordpress-3-8-1-multisite-blog-slug-problem

    My current options-permalink.php file on the server now says this, as recommended:

    $prefix = $blog_prefix = '';
    if ( ! got_url_rewrite() )
        $prefix = '/index.php';
    if ( is_multisite() && !is_subdomain_install() && is_main_site() )
        $blog_prefix = '/1';
    
    if ( isset($_POST['permalink_structure']) || isset($_POST['category_base']) ) {
        check_admin_referer('update-permalink');

    Yet, if you go to my site, it still has “blog” in the URL instead of “1”. That is true not only for existing posts but also for new posts, so it’s not just a lack of retroactivity (namely, it’s not that subsequent posts will reflect that change in some way).

    Here is the website: https://ciw-online.org/

    Any advice would be helpful.

Viewing 6 replies - 1 through 6 (of 6 total)
  • Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    Go to domain.com//wp-admin/network/site-info.php?id=1

    Click on settings.

    Scroll down to Permalink Structure

    Change it there.

    Thread Starter marleyciw

    (@marleyciw)

    If I change anything there, all of our internal links on our site break. I tried changing it to /1/%year%/, tried taking out the blog, etc — and tried making sure that the site’s dashboard permalinks settings at least matched that — and no matter what, every internal link was broken.

    It seems like any changes I make to either the site’s or network’s permalinks settings break all of our internal links. Thus, I was trying to go into the Multisite internal coding. I’ve given up on overriding the slug — I just want to superficially change it.

    Any other ideas?

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    Your definintion of ‘Broken’ is lacking then… WHAT is broken? What do you see and what did you expect to see? Do the URLs work or redirect to a 404 or what?

    Can you go to domain.com/1/2010/postname?

    This won’t change your OLD post content, nor your menus, but it should change your archive page.

    Remember. WE cannot see your site when it’s ‘broken’ unless you’re willing to ‘break’ it and leave it broken until someone has the free time to look.

    Thread Starter marleyciw

    (@marleyciw)

    I’m sorry, I should have been more specific. And I understand that you can’t see it if I don’t leave it broken, but we get too much traffic to allow that.

    All the internal URLs direct to 404s — broken links. Whereas WordPress’s “blog” insert seems to generate redirects fairly seamlessly, I can’t get it to do the same thing, but with “1”

    Moderator Jan Dembowski

    (@jdembowski)

    Forum Moderator and Brute Squad

    All the internal URLs direct to 404s — broken links.

    Can you provide a link to demonstrate i.e. real link -> 404 and provide the correct link it should go to?

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    All the internal URLs direct to 404s — broken links.

    What do the 404s look like? Are they WP based 404s or generic server ones?

    What’s in your .htaccess?

    What other plugins are you running on your main site?

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Change /blog slug in options-permalink.php’ is closed to new replies.