WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] moving servers and upgrading versions breaks permalinks (18 posts)

  1. joecwhite
    Member
    Posted 6 years ago #

    Howdy all,

    I'm in the process of moving my domain to a new server in order to upgrade to WordPress 2.5 (old server has old MySQL, so stuck at WP 2.0.9). I was able to migrate everything over ok, but can't seem to get Permalinks to resolve correctly. I can see in the database that all the posts and comments are there, and if I enter the "ugly" permalink, it resolves correctly to the "pretty" permalink address; for example,

    http://72.51.44.53/?p=601
    resolves correctly to
    http://72.51.44.53/2008/04/07/test/

    but that just 404's (and not the 'correct' 404 of 404.php, just a generic 404).

    I changed the siteurl and home entries to reflect the direct IP address of the serve, but for the life of me can't figure out what I am missing. Have searched the forum posts in vane. Can anyone point out to me where I am going wrong?

  2. haochi
    Member
    Posted 6 years ago #

    Have you check the .htaccess file?

  3. joecwhite
    Member
    Posted 6 years ago #

    Everything appears in order; located at the home directory of the blog (whereas wordpress itself is in cgi/wordpress):

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

    # END WordPress

  4. haochi
    Member
    Posted 6 years ago #

    Well, you should place the .htaccess file at the same directory as the index.php file.

  5. joecwhite
    Member
    Posted 6 years ago #

    it is

  6. hakre
    Member
    Posted 6 years ago #

    .htaccess might be disabled in cgi/.

  7. joecwhite
    Member
    Posted 6 years ago #

    tried moving it up a level, so that it resides at at [my www directory]/wordpress

    no change.

  8. hakre
    Member
    Posted 6 years ago #

    Well I'm not so firm with the permalinks internals but somehow wordpress is not able any longer to resolve a permalink to your posts. The first thing suggested under such conditions is to rebuild the permalink structure that is by setting the options again. Often this already solves the problems. Have you tried switching permalink types?

  9. joecwhite
    Member
    Posted 6 years ago #

    Partial success: I had switched permalink types before, but saved it and then went back to the 'month and day' version (which is what I had been using). If I leave it at default, it works! But then all the old links to posts on my blog, both internal and external, will be broken.

    It seems like there must be one place where I've got a munged setting, but no clue where it is.

    Gentlemen, I greatly appreciate y'all helping me with this...thank you!

  10. hakre
    Member
    Posted 6 years ago #

    Maybe then a forced upgrade of your database might solve the issue.

  11. joecwhite
    Member
    Posted 6 years ago #

    Forced the upgrade; got this result:

    WordPress database error: [Table 'joeblog.wp_categories' doesn't exist]
    SELECT * FROM wp_categories ORDER BY cat_ID

    WordPress database error: [Table 'joeblog.wp_post2cat' doesn't exist]
    SELECT post_id, category_id FROM wp_post2cat GROUP BY post_id, category_id

    WordPress database error: [Table 'joeblog.wp_linkcategories' doesn't exist]
    SELECT cat_id, cat_name FROM wp_linkcategories

    Upgrade Complete

    Your WordPress database has been successfully upgraded!

    all three did exist in the version I brought over. I can try to re-export from the old blog and re-import it on the new server.

  12. hakre
    Member
    Posted 6 years ago #

    This shows that your data is corrupt, no wonder permalinks are broken. Backup and remove the faulty database and re-export the old one. Then run the upgrade script again.

  13. joecwhite
    Member
    Posted 6 years ago #

    Exported old 2.0.9 DB, backed up and deleted current DB, imported the 2.0.9 and ran the upgrade script, get the same result. (BTW, it appears the upgrade script changes the structure of the DB. The 2.0.9 db before upgrade has the following tables:

    wp_categories
    wp_comments
    wp_linkcategories
    wp_links
    wp_options
    wp_post2cat
    wp_postmeta
    wp_posts
    wp_usermeta
    wp_users

    whereas the upgraded version of the same DB has these:

    wp_comments
    wp_links
    wp_options
    wp_postmeta
    wp_posts
    wp_terms
    wp_term_relationships
    wp_term_taxonomy
    wp_usermeta
    wp_users

    which explains why those errors appeared on the forced upgrade...they had already been converted.
    Again, permalinks work fine using the default permalink structure of

    http://www.joewhite.com/?p=123

    , but if I try to change to Day and Name

    http://www.joewhite.com/2008/04/08/sample-post/

    to maintain compatibility with external links to my posts, it fails.

  14. hakre
    Member
    Posted 6 years ago #

    Looks like you have got a character encoding problem on your site. maybe this breaks permlink compability.

  15. joecwhite
    Member
    Posted 6 years ago #

    the mbscript extension of php was not installed; got them to install it, but still having the same issue.

  16. joecwhite
    Member
    Posted 6 years ago #

    must be some PHP config issue somewhere; tried creating a brand-new 2.5 install, and got the same problem when I switch it to pretty permalinks.

  17. joecwhite
    Member
    Posted 6 years ago #

    OK, finally found it. After rereading Using Permalinks, I found this relevant section:

    Requirements:

    Apache web server with the mod_rewrite module installed
    In WordPress's home directory,
    The FollowSymLinks option enabled
    FileInfo directives allowed (e.g. AllowOverride FileInfo, AllowOverride All)
    An .htaccess file (if this file is missing, WordPress will try to create it when you activate "pretty" permalinks)
    If you want WordPress to update the .htaccess file automatically, WordPress will need write access to the file.

    I went in and checked the httpd.conf file, and, lo and behold, FileInfo directives were not allowed. I changed it to AllowOverride FileInfo, and now my permalinks are back to pretty!

    Thanks for all the help!

  18. mrkingid
    Member
    Posted 5 years ago #

    I have a similar issue. How do I get a hold of this "httpd.conf" file as I can't see it via FTP.

Topic Closed

This topic has been closed to new replies.

About this Topic