• Hello!

    I recently moved one of my WP blogs from a subdirectory to the root directory. Everything went swimmingly but one small issue remains.

    That is the issue of page links. They still point back to the old subdirectory. So far I’ve figured out how to change seemingly any other link but I can’t for the life of my determine how to change those. I can see the .htaccess file has the old subdirectory info in it but if I remove mention of the old subdirectory I get an ‘infinite loop’ error from my browser.

    I’m sure it’s something obvious and/or I’ll figure it out directly after posting this, such is my luck. But just in case, if anyone can point me in the right direction I’d very much appreciate it!

    Thank you~!
    -Merry

Viewing 3 replies - 1 through 3 (of 3 total)
  • What process did you use when moving the location of your wordpress install or blog?

    I typically export the database tables and use Find & Replace to replace the url portion that changes; I realize that not everyone works a move this way, but it is fastest for me and I do it a lot.

    That said, you *could* go to each page and check the page slug to see what is being used. In v2.8x, you may not SEE the page slug in each Page’s edit screen — use the Screen Options (upper right corner of the admin) to enable seeing it or edit via the “quick edit” link from the Pages list in your admin.

    Page slugs are stored in the database.

    For me, when moving development sites from development sub-domains, I generate a .sql file from the exported tables, then typically Find and Replace the part of the slug that will have changed, as in:

    dev.example.com to example.com which would change:

    http://dev.example.com/mypage-name to http://example.com/mypage-name OR, to show it with respect to a sub-directory, by changing something like http://example.com/myblog/mypage to http://example.com/mypage

    I find the UNIQUE portion to search for, then replace accordingly. Find and Replace is NOT for the casual user… keep in mind that you are *removing* part of the url, so you have to be careful what you select for finding (to get them all) as well as what you replace it with (to not be TOO specific)

    And, of course, make a copy of the sqlfile (the exported data file) before working on it!

    I am sure there are other ways to do this, but this is mine.

    Thread Starter merrycalliope

    (@merrycalliope)

    Thank you for your reply, syncbox!

    I’m a bit clueless about this stuff so I’d asked my host, who has previous supplied good advice (if not done the moves for me themselves, I guess they get bored sometimes). In this case, however, I’m wondering if it was the best advice.

    Basically, I was advised to do the move by editing the info in the Settings> General tab and then just moving all the WP files into the new directory.

    Seemed like a sledgehammer solution but it worked for the most part except for this last bit of Page confusion.

    Your suggestions got me thinking a little out of the box I’d been in. I checked the page ID and it showed the correct address. So I thought to check the files of the theme itself and, sure enough, the php file in charge of that sort of thing was not updating correctly. *headdesk*

    you mean you have hard-coded paths in your files?

    You know about using <?php bloginfo('template-directory'); ?> in your URL, right?

    Or does this have something to do with an .htaccess or wp-config file?

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

The topic ‘Changing Page urls…?’ is closed to new replies.