WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Giving wordpress it's own directory (8 posts)

  1. whitsey
    Member
    Posted 1 year ago #

    I configured wordpress in a sub directory (/wordpress) while I migrated the existing HTML site during a recent upgrade. Previously, (on other migrations) I had moved wordpress into the root directory and then spent the following 2-4 hours updating all URLs and images links, removing all bad links to /wordpress/... and testing links etc

    I decided this time to try and make it easier by simply changing the site URL using this guide:
    http://codex.wordpress.org/Giving_WordPress_Its_Own_Directory

    I thought this was the solution however, all links that were originally inserted into posts within the pages are still hard linking to /wordpress/blah-blah/ and failing with a 404!

    Can I assume that this method isn't designed to assist with easy migration? (ie I'm still going to have to update all my in post links anyway?) and therefore, I can't avoid a full migration?

    if you go to http://www.makingtrackscampers.com.au/ you can see the links in the body text are throwing 404 errors - is this solution unworkable for my needs?

  2. Pioneer Valley Web Design
    Member
    Posted 1 year ago #

    What is you simply used your host account to point your domain at the folder for /wordpress and then change the site url? You will, not matter what, need to update any (hard coded) url at your site that points to the wrong url.

    That can be done with a Search and Replace Plugin or with MySQL (PHPmyAdmin).

  3. whitsey
    Member
    Posted 1 year ago #

    ok thanks,

    so that is my exact question which I think you've answered - there is no solution to bypass updating all links within posts!

    What a pain in the backside!it would be good if wordpress used URL short codes based on blog URL instead of hard coding URLs in posts! perhaps a future enhancement!

  4. WPyogi
    Volunteer Moderator
    Posted 1 year ago #

    As Seacoast alluded to, plugins can do the heavy lifting for you - one of several: http://wordpress.org/plugins/velvet-blues-update-urls/

  5. Pioneer Valley Web Design
    Member
    Posted 1 year ago #

    What a pain in the backside!it would be good if wordpress used URL short codes based on blog URL instead of hard coding URLs in posts! perhaps a future enhancement!

    It is actually an easy step once you have that learning curve over...on most sites it takes a few minutes once you have this down...

  6. whitsey
    Member
    Posted 1 year ago #

    For anyone joining this thread DO NOT FOLLOW THE INSTRUCTIONS OUTLINED ABOVE!!!

    I looked into velvet blue update urls plugin to "do the heavy lifting" and 4-6 hours later I have fully restored my site and links back toe a working state!!!

    This solution is no good because all the in-post images still reference hard links to /wordpress/... so updating all URL's basically breaks every image url link!!!

    Lesson learnt!

  7. Pioneer Valley Web Design
    Member
    Posted 1 year ago #

    DO NOT FOLLOW THE INSTRUCTIONS OUTLINED ABOVE!!!

    I suggest the OP read on how to do this properly...

    That can be done with a Search and Replace Plugin or with MySQL (PHPmyAdmin).

  8. whitsey? Calmly please. You too Seacoast Web Design. ;)

    For anyone joining this topic: if you are going to do any wholesale modifications of your database to fix broken links then before you attempt it please make a complete backup of your installation first.

    http://codex.wordpress.org/WordPress_Backups
    http://codex.wordpress.org/Backing_Up_Your_Database
    http://codex.wordpress.org/Restoring_Your_Database_From_Backup

    That way if something goes wrong then you can at least put it all back as it was before you made that attempt.

Topic Closed

This topic has been closed to new replies.

About this Topic