WordPress 3.8.1 Multisite blog slug problem

Just installed WordPress 3.8.1 multisite but can’t remove the /blog/ slug. I’ve tried all suggestions for older versions of WordPress (including the solutions to the question posted on this site 6 months ago regarding removing from root) to no avail. Anybody know how to fix this or if it’s possible to fix?

I need two sites for a dual language website. Could a solution be to just create 3 sites and use the root site as an interface to the other sites, or should I use an alternative CMS?

Related posts

3 comments

  1. I fixed this in the following way.

    Go to the “Network admin”. Then Sites → Edit → Settings → Permalink Structure. Remove blog from it.

    Then I removed blog from two lines in table which obtained as a result of the query:

    SELECT * FROM wp_options WHERE option_name = "permalink_structure" OR option_name = "rewrite_rules" 
    

    Useful link on subject: How To Remove The /blog/ slug From The Permalinks(URL) in WordPress Multisite Installation Without A Plugin

    This works with WP 3.8, I have not tried with 3.8.1

    Note if you go to the main sites Setting -> Permalink you will still see blog, but it does not applied any more. But if you press “Save changes”, blog slug will be used again. You need to redo previous actions again

  2. In your main install folder is: wp-admin/options-permalink.php

    Change:

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

    to:

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

    Worked great for me, but you have to replace the slug with another I assume. (I did not try to leave it blank)

  3. I couldn’t get fixes for older versions to work with 3.8.1 either.

    I just removed blog from the options-permalink.php – left it blank and it’s working so far…. fingers crossed….

    $prefix = $blog_prefix = '';
    if ( ! got_url_rewrite() )
        $prefix = '/index.php';
    if ( is_multisite() && !is_subdomain_install() && is_main_site() )
        $blog_prefix = '';
    

Comments are closed.