• Resolved stopsineman

    (@stopsineman)


    Hello Everyone,

    I recently decided to attempt to make the switch to a WordPress driven site. In the process of doing this, I decided to also move wordpress into a subdirectory so that I could have a cleaner site root. All of this has gone fine (the blog lives at the url I want it to, and wordpress at a different location in a subfolder) except for the fact that now none of my posts work. I did a quick look into the wp_posts table and discovered that all of their guid’s still point to the old blog site, which is why I’m assuming, they’re all broken.

    How can I go about fixing this?

    Thanks in advance!

    Timmy V.

Viewing 12 replies - 1 through 12 (of 12 total)
  • You can either do a .htaccess redirect or search & replace the guid column.

    make sure the wordpress address (URL) and blog address (URL) are correct. You can access the dashboard, right, to get to these settings? You shouldn’t have to mess with the database, just double check those settings.

    Thread Starter stopsineman

    (@stopsineman)

    Yeah, that’s what’s weird. The wordpress and blog address are both correctly set. I can get to the home page of the blog fine at the expected address, and I can log in and mess around in wordpress fine as well. All of my posts even still show up. The problem is that I can’t access anything but the home page; no pages, no posts, no archives, no media, no nada. ??

    Anyway, I thought that even though the old posts are missing I should be able to post new ones as well as new pages. No luck there either. Every time I post anything new, I get the 404 page from 1and1.

    Any other thoughts? And thanks so much for these! ??

    Timmy V.

    Oh, I thought I had heard of some issues with 1and1… hmm.

    I have exactly the same problem. I started a thread in the themes section because I thought it was theme related ( https://www.ads-software.com/support/topic/168827?replies=6#post-733866 ) but I discovered that even switching back to the default theme doesn’t fix it.

    Basically I followed the instructions on how to move you index.php file to the root so you can access the blog via the root domain name such as example.co.uk instead of example.co.uk/wordpress. Since then al my likks are broken and I get a 404 page not found error when trying to view any post, comment, add comment etc.

    It’s as though the instructions here https://codex.www.ads-software.com/Giving_WordPress_Its_Own_Directory no longer work for wordpress 2.5

    The instructions do work in that they allow access to the blog home page directly from my domain https://www.snappyname.co.uk but all the links apart from the link to the admin control panel are broken. The whole link structure is no longer looking in the wordpress folder where all of the files remain (they haven’t moved)

    Foer example, I just posted a test article, which appears on the index page. Clicking the name of the article’s header which normally takes you to the article tries to go to https://www.snappyname.co.uk/test/ and gives a 404 error, likewise clicking the comment link to try adding a comment attempts to go to https://www.snappyname.co.uk/test/#respond and gives a 404 error.

    The links should surely be pointing to https://www.snappyname.co.uk/wordpress/test/ and https://www.snappyname.co.uk/wordpress/test/#respond
    shouldn’t they?

    What I don’t understand is that the support article says this is how to move your blog index file to the root folder whilst keeping your other files in a sub folder but it doesn’t update all the link structure properly. Am I doing something stupidy wrong or is this a bug in wordpress 2.5?

    Sorted it!

    I didn’t have a writable .htaccess file in the root. I knew this from the start but didn’t realise its signigficance because in my other wordpress blog I didn’t have one either and that worked fine for the last 12 months.

    I presume that moving the index file to the root away from the wordpress folder needed a .htaccess file to write some chages to?

    By default the .htacces file I created was chmod to 644. I changes it to 777 – does anyone know if this is what it should be set to please?

    BTW I created the .htaccess file in notepad using the text shown at the bottom of my settings page in admin, which I eventually noticed.

    Thread Starter stopsineman

    (@stopsineman)

    Awesome Washer!

    Could be a little more informative about where the contents of the .htaccess file that you created was found? I looked at the bottom of my settings page and didn’t find anything about that. I’m going to try just creating an empty 777 .htaccess file and see if that works.

    Which directory is that .htaccess file in? It’s important to know this because it could be either in the root or in your /[blog directory].

    Also, once things are working okay, go ahead and CHMOD the .htaccess file back to 644. If you need to change the permalink structure of your site again, CHMOD it, make the changes (in other words, let WP write to the file) and then restore it to 644.

    And thanks for posting back to this thread with your solution so that others could benefit. Good luck with your blog!

    Moderator Samuel Wood (Otto)

    (@otto42)

    www.ads-software.com Admin

    I did a quick look into the wp_posts table and discovered that all of their guid’s still point to the old blog site, which is why I’m assuming, they’re all broken.

    For reference, the content of the GUID fields does not make any difference. The GUID’s are simply unique strings. It uses URLs there, but they can be anything at all, as long as they are unique.

    Thread Starter stopsineman

    (@stopsineman)

    Yes! The .htaccess file worked.

    Steps:

    1. Go to your Permalinks section in the admin panel and make sure everything looks correct and hit save.

    2. FTP or SSH into the site and copy the .htaccess file located in the route of your wordpress install into the location of your blog route.

    3. Voila!

    Thanks everyone!

    Ok, thanks Otto. I just changed the domain name of my virtual server from example1.com to example2.com, and on doing a db wide search I noticed example1.com lingering in the wp_posts table. It bothered me to see all those instances of example1.com in the guid column, but now that I understand that it’s just a unique id, I’m relieved.

    Seems like a rather inefficiently long unique id, but I’m sure these guys have their reasons.

    Moderator Samuel Wood (Otto)

    (@otto42)

    www.ads-software.com Admin

    Seems like a rather inefficiently long unique id, but I’m sure these guys have their reasons.

    It’s a GUID, meaning “globally unique id”. Meaning that, in theory, no other post on any other blog anywhere shares it. The use of the URI is, basically, assuming that you control that URI and thus have control over its contents.

    It’s not particularly inefficient, computers are fast and deal with strings pretty quickly nowadays. There’s other ways to make GUIDs, but most software uses URIs nowadays for identifying things on the internet, because it’s easy and quick and it works.

    The main reason for its existence is for feeds. Feed readers can, in theory, use it as a unique identifier for a given post across the entire span of all posts in all feeds everywhere.

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘All Posts Broken After Moving WordPress.’ is closed to new replies.