Help: Changing database tables and /blog/ slug is not there

Hello,

I just switched a subsite into becoming the main site of the multisite.

After changing the postmeta and posts tables using Search & Replace DB plugin, it seems everything is fine.

However, I noticed that the url of posts on the main site do not contain /blog/ in the url.

I know WordPress forces that word into the url of the main site.

Is there some other tables I should be updating?

Or should I restore my files and redo everything?

Please help.

  • Kasia Swiderska
    • Support nomad

    Hello Daniel,

    Is your Multisite subdomain or subdirectory based? If its subdomain that blog slug will not be there. it shows only for subfolders based networks. It was way to resolve quite old conflicts and it is not really necessary to use it now https://core.trac.wordpress.org/ticket/12002

    If its subdirectory would you mind allowing support access so we can have a closer look at this?

    To enable support access you can follow this guide here:

    http://premium.wpmudev.org/manuals/wpmu-dev-dashboard-enabling-staff-login/

    kind regards,

    Kasia

  • Nithin
    • Support Wizard

    Hey Daniel Berhane,

    Hope you are doing good today. :slight_smile:

    Unfortunately the support access isn't working, I'm getting the following message:

    To change the slug to /blog for all the posts in your multisite, please edit your main site in the network dashboard, under Sites > All Sites.

    Once you edit the main site, under Settings tab, change the Permalink Structure to the following, and it should work fine:

    /blog/%postname%/

    I hope this helps. Please let us know if you still need any further assistance. Have a nice day. :slight_smile:

    Best Regards,

    Nithin

  • Daniel Berhane
    • Site Builder, Child of Zeus

    How do you do Nithin?

    After my last reply, I had a full database restored and repeated the process with wp-cli.

    The /blog/ slug is not visible on the post urls of the main site. I don’t really care for that slug. But WordPress Multisite adds that slug into the main site posts by default. So, I am afraid it’s absence might indicate a problem.

    [You should be able to access any time now]

  • Nithin
    • Support Wizard

    Hi Daniel Berhane,

    The /blog/ slug is not visible on the post urls of the main site. I don't really care for that slug. But WordPress Multisite adds that slug into the main site posts by default. So, I am afraid it's absence might indicate a problem.

    I checked your main site, and I could see all the posts has /blog slug in it:

    http://horxxxxxxx.com/blog/2017/04/06/ethiopian-premier-xxxx-xxxx-xxx/

    I checked your mainsite settings by editing the main site, and I could see the permalink structure in network dashboard is correct:

    You can add, or remove the /blog/strong> slug in that setting accordingly. I also checked the permalink of your main site, under Settings > Permalinks</strong, and it does show /blog slug in it.

    So, I'm a bit confused, and not exactly sure what I should be looking at? Is there anything I'm missing that should be looked upon? Please advise, and I'll make sure to get back to you asp. Have a nice day. :slight_smile:

    Best Regards,

    Nithin

  • Daniel Berhane
    • Site Builder, Child of Zeus

    Thanks Nithin.

    That probably happened after I posted an article last night or after I made changes to wp_options. One of the two caused WP to regenerate that slug. I read it happens that way……but didn’t occur to me.

    Thanks for your time.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.