Support » Localhost Installs » localhosts/wordpress links broken

  • I’m working on a WP site on my computer at home and have about 160 plus pages of news articles and pdf files.

    I’m trying to prepare a site for launch and though some navigation was restored after changing Permalinks to PLAIN. However I still have broken links to my news article copies using the “localhosts/wordpress” pathway. I have numerous links using the “http://localhost/wordpress/wp-content/uploads/2016/03/” that conversely work just fine. Go figure.

    Naturally I can’t launch until I get these fixed, so any help would be greatly appreciated.

Viewing 7 replies - 1 through 7 (of 7 total)
  • Hi there,

    It is always recommended to set the Permalink structure to ‘ post name’, (I personally also use this option for SEO purposes as well). Go ahead and set it to this option, if not already done so, press SAVE and try again. See if this helps you.
    On the other hand, the links with ‘local host’ prefix, (in local installations), don’t normally break and transition well when transfering your site to Live host. Did you manually change anything?

    Thread Starter tecombs

    (@tecombs)

    Thanks for the reply, Skopelo.

    I currently have the Permalinks set to “post” as you suggest.

    All I did was after the creation of my article pages was to preview my work and then click “publish.” That’s all. Ever since then, being a noobie (to Word Press not HTML/CSS), I thought that the fact that I couldn’t view them after that was just the way it was and I would be able to view them once installed to my production server.

    I was mistaken.

    As I looked into the cause I found the problem with Permalinks and changed the settings to “plain” and was able to view my site again except for the “localhost/wordpress” links to my very plain vanilla HTML documents that contained little more than <h3> and <p> tags with the occasional href link. There was no JS/JQuery added and all the formatting CSS was in the style.css file.

    Another thing is that there are about 10 href links in the footer that don’t work either and I have no idea why.

    The site is now live on the Internet thanks to Duplicator and as you can imagine I’m anxious to get it working as it should.

    Thread Starter tecombs

    (@tecombs)

    One thing I just observed is that Search results links do work and take me to the news articles I mentioned above. Just saying in case someone can help me to correct this bug.

    Because there are dozens of different ways links can be generated, the best way to resolve the issue is to find the footer template where they are created and back-track to how they are created.

    The links could have been hard-coded, derive from a database, configuration file, or even from the functions file or several others derived processes. With this particular issues you really have to get into the source and see how they are being generated, otherwise most of the suggestions will just be guesses at what the issue might be…

    Hope that helps!

    Thread Starter tecombs

    (@tecombs)

    Thanks for Cory for your input. I greatly appreciate that.

    It turns out that those links in the footer were created by me. First by initializing them in the Functions.php and then in the menus created.

    Funny thing was that WP added additional http:// prefixes to my link addresses. Once I removed those things worked fine.

    The stranger thing is the hand coded links by me in my article and news pages. Localhost/wordpress was rightly replaced by your plugin, another great feature, yet for some reason don’t work when clicked directly in the page in which they exist.

    However, when these same pages are found using WP’s search feature, the WP generated links work just fine. I just checked the search results’ generated links and they are the same as my hand coded ones. WordPress links work, mine don’t.

    Go figure. Yet another mystery. LOL

    Thread Starter tecombs

    (@tecombs)

    I tripped over a similar post where deactivating your plugins would fix this “Oops! That page can’t be found” error.

    https://wordpress.org/support/topic/oops-page-not-found-box?replies=22

    Many “unplugged” and fixed problems, some were not helped, this now includes me. I deactivated every single one of my plugins and still suffered the same old problem, “Cain’t find that page.”

    Again, if anyone with a success story I’d sure like to hear it. But then I was thinking of coding my own theme from the bottom up. But that could be weeks!

    Argh!

    Thread Starter tecombs

    (@tecombs)

    I could still use some help with broken links to the various news articles within my WP site.

    Just so you all know, I haven’t been sitting around all day. I’ve deactivated the plugins, changed the theme, stood on hands while I changed the Permalinks – several times. All to no avail. Actually all that bashed my local installation so badly I had to replace it with a saved copy.

    If I can’t fix this I’m going to have to put up the HTML site again while I rewrite a CMS theme from the ground up. Does this mean I know something? No. I just copy a guy’s online work who does.

    What I’m using is reworked underscores theme for my project. This is like send the whole Navy after a single boatload of Somali pirates. It’s bleeping overkill and complicated. Likely a termites nest where conflicts can intersect and cause havoc.

    Sigh.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘localhosts/wordpress links broken’ is closed to new replies.