• Resolved gburgan

    (@gburgan)


    After creating my WP site in a subdirectory, I moved it to the root directory by doing the following:

    1. WPAdmin: Settings> General> change wordpress url and site url to https://www.andpi.org, saved changes.

    2. Using FTP access with Filezilla: Moved existing site files to “archive” folder in root directory.

    3. Moved all wp2016 subdirectory contents to root directory.

    4. Site front page loaded properly after the changes above.

    But I noticed that the links on the front page were no longer working. They were pointing to the old location https://www.andpi.org/wp2016/… instead of https://www.andpi.org/…

    5. I went to WP Admin Settings> Permalinks and observed they were set to “Custom” with https://www.andpi.org//%postname%/.

    6. I changed Permalinks to “Plain” – and the “menu” links work! – but the articles and slider images linked do not work. I get a 404 error.

    I noticed that my root directory did not have the .htaccess file – I had a copy of this file on my desktop, have tried to upload it, with no success.

    I would like to use post name as my link settings, but not sure how to make this work. Or to get the .htaccess in the root directory. Oddly, I can’t delete the (seemingly) empty subdirectory “wp2016”.

    Thoughts?

Viewing 15 replies - 1 through 15 (of 16 total)
  • Moderator James Huff

    (@macmanx)

    You can put the permalink settings back to post name from plain and that should fix the problems you are having with the slider.

    If not, then you may need to edit the slider manually to fix the problem. Same with the links to the articles.

    Hope this helps.

    Thread Starter gburgan

    (@gburgan)

    Thanks. Should I assume that the Velvet Blues plugin will work the same even though this isn’t from one old domain to a new domain? It’s from a subdirectory to the root directory of the same domain.

    Thread Starter gburgan

    (@gburgan)

    Thanks, Davood. I did try switching to post name from plain. Every time I made that change, all menu links, slider links and story links failed. I will try again. But I may use the plugin suggested by the moderator. Thanks for your offer of assistance.

    @gburgan I actually forgot about that plugin myself. It has helped me a couple of times with this same exact issue. Once you have used it you should be able to change back to post name from plain and it will work correctly!

    Always happy to help. Do not hesitate to post your questions here thats what the forums are here for! ??

    Moderator James Huff

    (@macmanx)

    Yes, the plugin will help you change from any old base URL to a new base URL.

    Thread Starter gburgan

    (@gburgan)

    Well, that was quick – results were 127 changes made. Sounds about right. When I hover over a link (example: https://www.andpi.org/news), while in post name permalink mode, it’s pointing to the write address… and the permalink says the same thing on the page in edit mode… but I still get a 404.

    Thread Starter gburgan

    (@gburgan)

    Ugggh. This makes no sense.

    Page is https://www.andpi.org/news
    Permalink is set to post name
    Permalink on page editor view is https://www.andpi.org/news
    Link on hover is https://www.andpi.org/news

    Result of clicking link: 404

    ????

    Could you please share your htaccess code using https://pastebin.com/

    Thread Starter gburgan

    (@gburgan)

    I no longer have an .htaccess code in my root directory. I’ve check to make sure Filezilla is forced to show hidden files and it’s not there.

    I have the file on my desktop from where I downloaded it months ago. I tried to upload it, copy and paste it, but I keep getting an error msg in Filezilla “prohibited file name” “Critical file transfer error”

    Thread Starter gburgan

    (@gburgan)

    This is the code that I’m trying to upload but can’t

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ – [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>

    # END WordPress

    Who are you hosted with?

    WordPress usually creates the file automatically when you save the permalinks setting page but some hosts do not support htaccess cause of their configuration.

    Thread Starter gburgan

    (@gburgan)

    Yahoo Smallbusiness…now called Aabaco.

    The file was there when everything was in the subdirectory… when I moved everything, it didn’t copy over. So they allow it in the subdirectory but not the root?

    I have never worked with the Yahoo servers. I do know that some server use a special type of redirect to hide subdirectories though.

    I am afraid I can not be of any more help on this but I am sure someone else here in the forums has experienced this and can help.

    Thread Starter gburgan

    (@gburgan)

    OK. Thanks for your time. Much appreciated.

Viewing 15 replies - 1 through 15 (of 16 total)
  • The topic ‘After WP moved from subdirectory to root, some links broken’ is closed to new replies.