[resolved] Moved wordpress to a new server, now all links are 404s (10 posts)

  1. giftdonkey
    Posted 7 years ago #

    Since I have no idea exactly what is going wrong or at what point the going-wrong-edness began, I am going to relay my sad tale from the beginning, probably with more detail than necessary:

    Recently my blog (www.neverslapthegiftdonkey.com) was "stumbleupon"-d and my 1000% increase in traffic caused my old server to crash and my host forced me to upgrade from shared hosting (linux server) to a VPS (centOS/Apache 2.2.3).

    In preparation for moving the wordpress over, but before I changed my DNS settings to point to the new server, I exported my posts etc using the wp-admin export thing, creating an xml file. And I downloaded my entire public_html directory (including all of my wordpress files). I then installed 2.6.2 on the new VPS server (following the directions on wordpress.org). Previously I had been using 2.6.1. Using my VPS's IP address (since I didn't have a domain assigned to it yet), I ran the install.php script, set up my wordpress - imported my posts and tags and images etc and everything seemed to be working correctly.

    Then my host set up the DNS to go to the new server, but when you would go to my url (neverslapthegiftdonkey.com) the browser would redirect to my IP address ( and then display my blog. I went into the wp-admin settings and re-set the WordPress address (URL) from the IP to the URL and the blog address to the URL. Then when I went to test it, all of the links (permalinks, tags, comments etc) within my blog give me the following error:

    Not Found

    The requested URL /url-name-here/ was not found on this server.
    Apache/2.2.3 (CentOS) Server at neverslapthegiftdonkey.com Port 80

    Since then, I did some searching, tried creating an htaccess file (no effect).


  2. @mercime
    Volunteer Moderator
    Posted 7 years ago #

    First of all, kudos for not only backing up database and public files but also making an XML export!
    Based on your explanation (well done by the way) you are just missing some ingredients to your new install
    1. delete the htaccess file you uploaded, upload an EMPTY one CHMOD to 666
    2. go to Admin > Manage > Permalinks and run it. The permalink settings/configurations will then be added to your htaccess
    3. CHMOD htaccess to 644.
    4. don't forget to delete install.php :-)

  3. giftdonkey
    Posted 7 years ago #

    unfortunately, I am still getting the same error.

    Though, in step 2, I don't have admin > manage > permalinks. I only have admin > settings > permalinks. And I wasn't quite sure I knew how to 'run' it beyond clicking "save changes". is that what you meant?

    I am changing the permissions of the .htaccess file using my FTP client.

    (thanks so so much for responding)

  4. @mercime
    Volunteer Moderator
    Posted 7 years ago #

    oops, yes it is Admin > Settings > Permalinks, my bad. And yes, you run it by clicking "Save Changes"

  5. giftdonkey
    Posted 7 years ago #

    I did that, and no change. any other ideas?

  6. moshu
    Posted 7 years ago #

    Does it work with the default permalinks?

    Also, are you sure on that new server the mod_rewrite and AllowOverride is enabled? If not, the permalinks dont' work.

  7. giftdonkey
    Posted 7 years ago #

    this is what the htaccess file says now (after completing steps 1-4):

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

    # END WordPress

    still the links don't work though.

  8. giftdonkey
    Posted 7 years ago #

    @moshu: how would I check on that?

    (thank you btw)

  9. moshu
    Posted 7 years ago #

    Ask the host - or you should have access to the server settings if it is a VPS. Sorry, I never managed anything else than my "localhost" XAMPP installation...

  10. giftdonkey
    Posted 7 years ago #

    Ok, the mod-rewrite was already enabled, but I got my host to change the allowoverride from none to all and it worked! thanks everyone!

Topic Closed

This topic has been closed to new replies.

About this Topic