place urls messed up after moving from subdirectory to root

This topic contains 11 replies, has 4 voices, and was last updated by  Stiofan O’Connor 8 years, 4 months ago.

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
  • Author
    Posts
  • #65622

    xico
    Buyer
    Post count: 42

    I put my geodirectory site in a subdirectory called “site” for testing and building. Now that it’s finished I want to put it in the site root. I duplicated the .htaccess file and changed the index.php file to reflect the move. The WordPress pages load fine but my place urls are broken. I get something like this:
    http://main/vancouver/restaurants411.ca/main/pop-up-kitchen/

    it should be:
    http://main411.ca/main/restaurants/pop-up-kitchen/

    Please advise.

    #65624

    Guust
    Moderator
    Post count: 29970

    Please review https://codex.wordpress.org/Moving_WordPress#Moving_Directories_On_Your_Existing_Server

    You need to change all references in your database.

    #65697

    Paolo
    Site Admin
    Post count: 31206

    Hi,

    just FYI, this tool makes it super easy: https://interconnectit.com/products/search-and-replace-for-wordpress-databases/

    Thanks

    #65783

    xico
    Buyer
    Post count: 42

    I tried submitting a new test place listing and the url is also broken.
    Are you saying we cannot install Geodirectory in a subdirectory first and then point to it from root?

    Please advise.

    #65785

    Guust
    Moderator
    Post count: 29970

    Yes, you can, but only if you change all URLs in the database. It is not good enough to only change the WP settings in admin.
    Changing directory is much the same as changing domain alltogether.

    #65795

    xico
    Buyer
    Post count: 42

    I used the same method as I did for moving my WordPress sites from subdirectory to root by copying .htaccess and index.php and editing the index.php to reflect directory change. This has worked properly for over 12 sites without having to change urls in the database.

    I think the urls only got messed up after I tried editing the Location url prefix by setting the location page in the latest version of GD.

    As you can see all the other WordPress pages and posts are working fine. It’s just the category page listing links that are messed up.
    http://main411.ca/main/restaurants/

    Adding new listings also creates broken links on that page.

    #65796

    Guust
    Moderator
    Post count: 29970

    Your breadcrumbs are all wrong too.
    These 12 other sites were GD sites too?
    You got any caching happening?

    If you want us to have a closer look, post your admin details in a private reply.

    #65797

    xico
    Buyer
    Post count: 42
    This reply has been marked as private.
    #65940

    Paolo
    Site Admin
    Post count: 31206

    I’ve flagged this for Stiofan. He’ll let you know asap.

    Thanks

    #65945

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    Hello,

    I’ll need to debug the code, can you please provide FTP details.

    Thanks,

    Stiofan

    #65979

    xico
    Buyer
    Post count: 42
    This reply has been marked as private.
    #66042

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    Hi, thanks for the info, i have fixed the main links but the breadcrumbs links are still broken, but when i try to save the permalinks it causes a 500 error on the front end, i think this has something to do with you having the site in a subfolder but the url u are pretending to have it in also has a wp install.

    Thanks,

    Stiofan

Viewing 12 posts - 1 through 12 (of 12 total)

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket