• bbbent

    (@bbbent)


    Alright, read a lot of threads, didn’t find this one. Doesn’t mean it wasn’t there somewhere, but I couldn’t find it.

    Built out a site for a client that was entirely driven by the blog as the main page. They approved it, we pushed it live.

    After we went live, they decided they didn’t want that setup. What they wanted was their old bootstrap index.html page, and then the blog as a subfolder with a link.

    So I’ve had to move this site several times and set up a few new AWS test servers. Had quite a bit of trouble getting the home and siteURL variables right, but I’m past that now. But I’ve still got troubles and I’m stuck.

    The test site is here:
    http://34.239.226.239/

    Wordpress is installed in /blog/ subfolder.

    The link to blog at the top of the page points to:
    http://34.239.226.239/blog/index.php

    Clicking that link works, the blog page loads and displays a it should.

    The issue: None of the post links work. Clicking a link takes you back to the root page. For example, the blog posts currently use default permalinks, so the top of the two posts should go to http://34.239.226.239/?p=346. Only that’s not where the posts live. So when it tries to load that page it can’t find anything and just takes you to the site root’s index.html page again.

    Wordpress URL is http://34.239.226.239/blog
    Site URL is http://34.239.226.239/

    So what’s up with the permalinks?
    So I’ve tried permalink adjustments, and that has mixed results.

    For example, if I change the permalinks to “Month and Name” and then add the /blog/ subfolder in front using this structure:
    http://34.239.226.239blog/%year%/%monthnum%/%postname%/

    Then I get a really wierd result. Reloading the root index.html and clicking the ‘blog’ link will try to go to /blog/index.php

    But then it rewrites to try and load this page, which is a url that doesnt actually exist:
    http://34.239.226.239/blog/2017/02/blogepisode-5-return-to-forever/

    But that was a deleted test post from site development. So in the end what you get is the header (incorrectly styled) and the first post it can find in the database.

    So, for now I set permalinks back to ‘plain’.

    And that’s where I’m stuck. My client’s been waiting quite awhile and this is really dragging out 🙁

Viewing 5 replies - 1 through 5 (of 5 total)
  • sinip

    (@sinip)

    You’re missing /blog/ in those blog article links. This one works – http://34.239.226.239/blog/?p=239
    or this one
    http://34.239.226.239/blog/?p=346

    • This reply was modified 9 years ago by sinip.
    • This reply was modified 9 years ago by sinip.
    Thread Starter bbbent

    (@bbbent)

    I understand that. But it’s the symptom of the problem, not a solution.

    For example, I changed the permalinks now so that they use:
    http://34.239.226.239/blog/%post_id%/

    So if you look at the root site, and link to the blog it still doesn’t load the index.php page as it should. It now loads this:
    http://34.239.226.239/blog/239

    So the permalink change is working. If you let it load that page (which is the first post it can find) you can move to other blog posts and they load.

    But that still leaves me with the problem of the link from http://34.239.226.239/ going to the wrong result. It points to http://34.239.226.239/blog/index.php.

    What it’s supposed to load is a preview page that shows blog excerpts for the most recent posts. But that’s not what it’s doing.

    sinip

    (@sinip)

    Have you tried to delete .htaccess file and then recreate it?

    Thread Starter bbbent

    (@bbbent)

    I did try that, and that gives me more unexpected results. I have it set up with no .htaccess right now.

    So if you go to http://34.239.226.239/ and follow any of my test links to the blog page at /blog/index.php you go correctly to the blog. But that is because I have the permalinks set to plain. So once you get to the blog you then have the original problem of the blog links themselves pointing to pages like this:
    http://34.239.226.239/?p=346

    So that results in no result because that page is at http://34.239.226.239/blog/?p=346 so it loops you back to the root instead.

    I’m about ready to pay someone to help me sort this out. Not sure where to go for that though.

    Thread Starter bbbent

    (@bbbent)

    OMG this turned out to be so unbelievably simple. I should have seen it a long time ago.

    When moving the blog I had to do a lot of manual resetting of the siteURL and Home URL as described in Moving WordPress.

    I did this mostly using manual updates to wp-config.php as described in the article.

    Then, after I got the links working I kind of forgot about that.

    So it turns out that the cause of the problem was still that setup.

    Here’s what wasn’t working that I just hadn’t noticed:
    Failing siteURL after move

    And here’s the fix. So SIMPLE> DURRRRRRR.
    Fix for moved site

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Link problems after test site move(s)’ is closed to new replies.