• Resolved MBWD

    (@mbwd)


    I recently inherited a site, and I’m in the process of moving it to a different server right now. While the DNS changes propagate, I decided to visit by IP directly to see how it looked. You can see it at 199.180.31.163/~nvla/

    I am getting a 404 error. The move itself seems to have worked, because it’s showing all the right headers and footers. But it’s not taking me to the home page. I can’t tell what page it thinks I want to go to. This is actually my first subdirectory install, but I’ve followed the instructions in the Codex carefully.

    This site was a mess when I got it and there have been a lot of land mines. I chose to keep it in a subdirectory because it was easiest. I’m wondering if there are .htaccess issues or something else. I would like to just identify why I’m getting a 404 (beyond the obvious fact that it’s trying to open a page that doesn’t exist). Any insight would be appreciated.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The blog was installed on a subdirectory, correct?

    Explain how did you “move it” and the steps you took.

    Thread Starter MBWD

    (@mbwd)

    I created a file structure in my new CPanel account that mirrors the file structure on the old host. That is, on the new server, in the www directory of my CPanel account, I created a subdirectory of the same name as the subdirectory where WP is installed on the old server. I copied all WP files from oldserver/www/subdirectory to newserver/www/subdirectory. Then I copied .htaccess and index.php from newserver/www/subdirectory and placed them in root.

    I exported the database from the old CPanel/phpMyAdmin account and imported it into the new one. That went off without a hitch and the database is obviously properly connected.

    I have double-checked that the home and siteurl entries in the imported database are identical to the original. I’ve also verified that the .htaccess and index.php files in both versions of the site are identical, with one exception, as follows:

    In the original root-level index.php was this line:

    ‘require(‘./subdirectory/wp-blog-header.php’);’

    According to the Codex, this is incorrect. I changed it in the new root-level index.php to read:

    ‘require( dirname(__FILE__ ) . ‘/subdirectory/wp-blog-header.php’);’

    (Note: the subdirectory is not actually named ‘subdirectory’.)

    I tried changing it back to match the original just in case that was the problem, but the 404 continues no matter which version of that line I use.

    Nothing else anywhere in the site files has been changed or renamed.

    Did you create the same username and password for MySQL database?

    199.180.31.163/~nvla/ is the real site right now but the script is pointing to yoursite.com/subdirectory. So its confused and resulting in 404 errors.

    I believe this will problem will disapear once the DNS propagation is complete.

    Thread Starter MBWD

    (@mbwd)

    I had not created the same db username or password. I tried that just now and it didn’t change anything, but I didn’t expect it would since I am not getting any database connection errors.

    I also wondered if it was somehow related to DNS propagation. I guess I’ll find out when that is finished. Thanks for your input.

    Thread Starter MBWD

    (@mbwd)

    It seems you were right, HostPuma. Even though IP lookup indicates IP hasn’t changed, a plugin I use in the dashboard tells me that the DNS change has actually taken place, and the domain is working fine. Thanks again.

    Your welcome and good luck with your website.

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘404 error after sub-directory install and server move’ is closed to new replies.