• Resolved inge12

    (@inge12)


    I imported about 40 posts plus users to a fresh install of WordPress on a test domain.
    Then I enabled multisite, and it seems to be fine.
    Posts and excerpts show up on the front page.
    Posts show up in the editor.
    But clicking on the titles or “more” on the front page yields a Page not found error.

    Here’s the reason:
    Before the multisite enabling, post addresses were like this:
    https://4goodhealth.com/2011/06/13/new-look-more-content/

    After enabling multisite, WP lists addresses like this:
    https://4goodhealth.com/blog/2011/06/13/new-look-more-content/

    On the front page, the links include the /blog/ subdirectory, but posts are “not found” when clicking on titles.

    In the editor, the Permalinks are without the /blog/ subdirectory, posts show up fine, except “Preview” renders a “page not found error.”

    Basically, no links on the home page work — no categories, no comments, no posts, nothing.

    I tried “repairing” the database. Made no difference.

    There has to be an easy solution to this, but I can’t see it. (I could edit the database manually, but don’t really want to!)

    CORRECTION: Some links work:
    https://4goodhealth.com/study-guides/ works.
    As a matter of fact, all the page links work, even though they are not linked to a (virtual) subdirectory. But the posts yield error messages with or without the /blog/.

Viewing 12 replies - 1 through 12 (of 12 total)
  • Try going to Settings -> Permalinks and clicking save. That should take care of it.

    and the /blog/ illw be inserted in the permalinks on the main site in subfolder installs.

    Thread Starter inge12

    (@inge12)

    Thanks, Tim, it worked.

    Should have thought of it myself.

    But now I’m meeting strange behavior once more:
    This install is in the root (/public_html/) directory.
    The last time I installed a blog in the root, it automatically added /blog/ in the permalink structure, quite contrary to my expectations.
    Then I was told that this is default behavior, and, indeed, the codex says that it is.

    Now for the strange part:
    In this install, WP is choosing not to insert the /blog/ into the permalink structure!

    These permalinks currently work:
    https://4goodhealth.com/category/lesson-helps/2011b-garments-of-grace/ (post)
    https://4goodhealth.com/study-guides/ (page)

    What gives?

    Is WP just temperamental?

    I want to understand what’s going on so that the next time I have to move a real site (coming up), I don’t pull out as much hair as the last time;)

    Thanks much for the feedback. ??

    PS Network functions seem to work. I have one sub-site installed.
    I woulcn’t mind if this permalink structure were default behavior, but that is not how the real site is working! (I copied it to this domain for a sandbox environment.)

    and you’re sure you enabled the network on that site and picked subfolders?

    Thread Starter inge12

    (@inge12)

    H’mm … I installed the WP in the main directory of the site.

    You mean picking subfolders for “sub-sites”?

    The installation process told me that I could not use sub-folders because this was not a “new install” (I had already imported content from another blog) but had to use sub-domains, which was fine with me.

    Does that make a difference? Does it change default behavior?

    Is it possible to change this setting after an install?

    For instance, can I change an install to put sub-sites into sub-domains, rather than sub-folders? (I like the idea of shorter URLs for the main blog. Would be a bit of work, with 40 posts, 183 comments and 14 pages so far. Any (relatively) easy way to do it?

    (I assume WP creates the sub-domains [probably virtual] automatically?)

    You asked why you did not get /blog/ in the permalinks.

    In this install, WP is choosing not to insert the /blog/ into the permalink structure!

    It’s because you picked SUBDOMAINS.

    You only get /blog/ in your permalinks when you pick SUBFOLDERS.

    WP does not create the subdomans anywhere but in the db. They work via wildcard subdomain records on the server, as explained in the codex page.

    Do your subdomain sites actually work?

    Thanks for this info, as a note I split my main WPMS blog into two blogs this morning and all seemed to go well until I clicked a category or tag. Then the page would go to page not found.
    I changed the permalink thingies as suggested and all seems to work well.
    Of course I only came here after after I uninstalled and reinstalled the blogs again. Life is nice.

    Thread Starter inge12

    (@inge12)

    To answer Andrea:
    No, actually the sub-domain install does not work. It only showed up in the Network panel as though it did.
    So I deleted the empty sub-site and actually created a sub-domain in Cpanel. Cpanel told me the subdomain would be https://inga.4goodhealth.com and the document root would be home/public_html/inga (and that’s the same level as the wp folders).

    I re-installed the sub-site. But the sub-domain install stil won’t work. What could be the matter?

    because you created the subdomain manually and it made a folder. that’s why it won’t work.

    . Cpanel told me the document root would be home/public_html/inga

    it needs to be just /public_html/.

    the reason it didn’t work before that is because you don;t have wildcard subdomains in place either.

    I created a new multisite with subdirectories afterwards manually by pasting the WP code into wp-config and .htaccess. I had uploaded already all my pages and probably therefore multisite with subdirectories were not an option anymore.
    I used a simple Permalinks structure in my localhost site ( /name ). On the multisite I use /site2/name. ( Thanks Tim !) I imported all pages from localhost to each site and deleted the pages I dont need (language dependent).
    Almost everything works except for one “little” problem. If I click on the site title in e.g. dashboard site2 I am getting the message “Directory has no index file”. The site subdirectories are empty. Is this as it should be?

    Thanks for any hints!

    you don’t out the site name in the permalinks.

    you also do not make physical folders on the server.

    Thank you very much for the reply!
    I believe I had to create the physical folders for the subdomains, anyway, deleted the folders and now the title link works.

    Changed the permalinks to: /domain.com/site#/name

    On one site I have now a widget which should not exist at all and cant figure it out where it comes from …

    Thanks again !

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘Enabled multisite, now links don't work’ is closed to new replies.