Problem moving Wordpress site from one domain to another, and on a new webserver.

Problem moving Wordpress site from one domain to another, and on a new webserver.

The odd thing is, I can log into the wp-admin area and make changes, save things, etc.

But when I go to the site: http://www.greatersba.org/ I get a 500 internal server error.

NOTES:

- I am on Windows 2008 Server (64bit) with IIS7.
- PHP INFO can be seen at http://www.greatersba.org/php-info.php
- I copied all files from the old server to the new server.
- I updated the mysql database with all updated references to the new folder structure and url, etc.
- As I said, I can log into wp-admin and do everything but I just can't get the "pages" to show up.

So, PHP is working, etc.

Any idea what could be not allowing the pages to come up, yet the login to the back end doesn't work.

ADDED NOTES OF THINGS I TRIED:

- I turned off my custom permalinks and that still doesn't fix the problem.
- I also tried changing themes .. but that didn't help anything either.

I'm thinking some files may not have copied over well, when I FTP'd them. But why would the ADMIN area function fine, but just not the public area and pages?

Is there something I need to do and set up on the new server that may not yet be in place? What other thoughts do you have?

Gary
njcuwebsupportAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
jrm213jrm213Connect With a Mentor Commented:
There are a couple of possibilities in this thread that you should look into.  People with the same issue of relative paths work in subdirectory but not in root, and they are all using iis7 with php applications.

http://www.webmasterworld.com/php/3685216.htm

1. I'm not sure if this only applies to ASP/SSI, but IIS6 (not sure about 7) does have a "parent paths" option. If you select your websites and go to the Scripts Configuration menu, under the options tab "Enable Parent paths" is an option.
2.  I ran into this problem, too; giving the anonymous IIS user permissions to the parent directory fixed it.
0
 
jrm213jrm213Commented:
did you move from a linux, php server to windows or from windows environment to windows environment?
0
 
njcuwebsupportAuthor Commented:
windows to window
(But windows 2008 32bit to windows 2008 64bit
0
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

 
jeremyjared74Commented:
You probably need to do a 301 Redirect:
Here is the link to a plug-in: http://wordpress.org/extend/plugins/simple-301-redirects/
0
 
njcuwebsupportAuthor Commented:
There's nothing there at the moment.

I didn't need to do this on my other server, but if you could explain .. that would be great, since there's nothing at that page right now.
0
 
jrm213jrm213Commented:
0
 
jeremyjared74Commented:
That is strange, the Wordpress plug-in directory is down. I will search for a site that explains it.
0
 
jeremyjared74Commented:
0
 
njcuwebsupportAuthor Commented:
I'm confused why you're recommending this to fix the 500 error.  Can you explain?

Thanks.
0
 
jeremyjared74Commented:
From what I have read, what you tried should have worked. The only thing I have read that could cause a problem is if you attempted to access the site before you changed the URL in the wordprss General Settings page (where is says the URL of your site/blog.

Here is where I found the article:
http://codex.wordpress.org/Moving_WordPress
0
 
jeremyjared74Commented:
Ok forget the 301 re-direct, that would produce a 404 error not 500. Did you back-up your database?
0
 
jeremyjared74Commented:
POST #1000

I think to correctly diagnose your problem, it is going to require more information. First off, lets make sure you did the move correctly. Here is a very simple "checklist" that is well written. If you would go over it and report back any steps you may have missed, I think it will help resolve the issue faster.

http://www.optiniche.com/blog/273/move-wordpress-to-new-host/
0
 
njcuwebsupportAuthor Commented:
I did all of these things.

But .. let's think for a second and just consider the fact that I can log into the wp-admin area with no problem.

Realizing that .. what would allow that to work, but cause a 500 error when I go to a public page?

Gary
0
 
jrm213jrm213Commented:
1. I would try re-uploading the root files, not the directories like wp-admin, wp-content, wp-themes etc., to make sure that they are not corrupt. index.php in the root is used for site, index.php in wp-admin is used for admin part of site, so if the one in the root is corrupt and the one in wp-admin isn't that could cause your scenario.
2. You might want to try removing/disabling your plugins, if that fixes it, re-enable 1 at a time until you find the problem

0
 
njcuwebsupportAuthor Commented:
I actually .. just a little bit ago, copied everything, then deleted the original files and folders, except for wp-content and the wp-config.

Then, I downloaded Wordpress 3.01 again and reinstalled it and connected it up.  But the problem still exists.

I also deactivated ALL the plugins, but that didn't do anything either.

Should I start to cry?

Gary
0
 
jeremyjared74Commented:
Not yet, I will look a little deeper.

Not to put salt in the wound, but the author of the link I sent you made a good point. Not to remove the old blog, until the new one is up and running. Unless you are running on your personal server, and have only 1, then I guess you have no choice.
0
 
njcuwebsupportAuthor Commented:
I didn't remove the old one yet.  :-)

My next step is going to simply create a brand new install .. with nothing in it and see if I have the same problem.  I'll report back after that is done.
0
 
jeremyjared74Commented:
OK, I have another idea. I remember when I was learning Wordpress, I crashed our company web-site. I was trying to get a plug-in to work and it said I needed to change file permissions. I was completely new at Web Design and WP. I changed something incorrectly and the site went down! The next day I was called to the office and had to explain why After the embarrassment of the situation. I called the company hosting our site and asked the lady what happened. She said the file permissions were incorrect and caused the 500 error.

On a different occasion I crashed it again messing around with the permissions. Not wanting to go back and explain myself again, I gave the entire site 777 permissions. I don't recommend this for long, but you might want to try it temporarily.
0
 
jeremyjared74Commented:
Two more possibilities.

Firstly create a new file in notepad or similar  and enter the following php_flag
register_globals off
register_globals = 0
memory_limit = 64M
Save this file as php.ini and upload it to your /wp-admin/ directory of Wordpress

Suggestion 2:
Open the .htaccess file and enter these 2 lines on their own lines:
AddType x-mapp-php5 .php
AddHandler x-mapp-php5 .php

Source: http://lee-jones.com/blog/fix-error-500-internal-server-error/
0
 
njcuwebsupportAuthor Commented:
Ok.  I tried the above, but nothing different.

But here's what I tried and found (so far).  It's very odd.

If I do a FRESH install of Wordpress to a new subfolder of www.greatersba.org, such as  www.greatersba.org/wp/ or anything else, it works perfectly.

But, if I try to do the install from the root (wwwroot) at  www.greatersba.org  .. I get the 500 error.

I can install it in the ROOT .. but when I try to go to the index.php file .. or to another page, such as  http://www.greatersba.org/?page_id=2 .. I continue to get the 500 error message.

But again, if I install it in a sub folder of www.greatersba.org, I have no problems.

So, .. what could it be about putting it in the root that would be different and cause the problem.

Any ideas on how to help?  Again, I am on a Windows 2008 server 64 bit, with IIS7.

Thanks,
Gary
0
 
njcuwebsupportAuthor Commented:
Here's the problem:

If I do a FRESH install of Wordpress to a new "subfolder" of my domain at www.greatersba.org, such as  www.greatersba.org/wp/ or anything else, it works perfectly.

But, if I try to do the install from the root (wwwroot) at  www.greatersba.org  .. I get the 500 error.

I can actually install it in the ROOT of the site by going through the wp-admin/install.php .. but after it installs, ... when I try to go to the index.php file (to look at the public site) .. or if I try to go to any other page, such as  http://www.greatersba.org/?page_id=2 .. I continue to get the 500 error message.  (Note: When I go through the install process, it said it couldn't write and create the wp-config.php file so I had to manually create this.  But .. when I installed it to a sub folder, I didn't have this issue.  Odd .. huh?)

But again, if I install it in a sub folder of www.greatersba.org, I have no problems at all.  The problem is only when I try to install and access the site from the ROOT.

So, .. what could it be about putting Wordpress in the root that would be different (from a sub folder) and cause this problem.

Any ideas on how to help?  Again, I am on a Windows 2008 server 64 bit, with IIS7.  I also have full permissions set to 777 on the wwwroot folder.  So, I dont' understand what the problem could be.  But again I am on a Windows 2008 server running 64bit.

Thanks,
Gary
0
 
jeremyjared74Commented:
I don't have a solution. I didn't want you to think I bailed on you. I am just stumped, especially since you have the 777 and still no access. If I come up with something I will post it.
0
 
njcuwebsupportAuthor Commented:
Thanks.  But it's just so friggin' crazy that it works in a sub folder, just not in the root.

Let me know if you come up with any suggestions.

:(
Gary
0
 
jrm213jrm213Commented:
who is your host?
0
 
njcuwebsupportAuthor Commented:
Ok.  I found the problem, even though I don't know why .. but I was able to fix it.  If someone can tell me how to fix my server so this wouldn't be an issue, or if you can explain why this is happening in my root folder (but not in a sub folder), I'll still be happy to award the points .. for all of your help.

But the fix was .. in the index.php file, there was a call to a page.  The code looks like this.

<?php
/**
 * Front to the WordPress application. This file doesn't do anything, but loads
 * wp-blog-header.php which does and tells WordPress to load the theme.
 *
 * @package WordPress
 */

/**
 * Tells WordPress to load the WordPress theme and output it.
 *
 * @var bool
 */
define('WP_USE_THEMES', true);

/** Loads the WordPress Environment and Template */
require('./wp-blog-header.php');
?>

The fix was in the last line.

I had to change   require('./wp-blog-header.php');   to  require('wp-blog-header.php');

I had to remove the  ./   in front of the file name.

that's it.  It was having a problem finding this page.

So, what I'd like to know is this.

1.  Why .. on my Windows 2008 server, was it not simply looking in the same folder that the Wordpress installation was in .. to find the file.  The  " ./ " should have meant to stay in the current location.  Correct?  But in Windows .. maybe this was confusing things.  Please explain if you would.

2.  Is there something I can do on my server or within IIS7 .. so that it would handle the   ./   in a way that wouldn't have confused things and not worked?

3.  Why would it work (with the  ./ ) in the sub folder installation of Wordpress, but not in my root installation?   If I installed Wordpress in the root of the site, I had to remove the " . / "   Why?


Thanks,
Gary
0
 
jrm213jrm213Commented:
do you have any kind of redirection going on in web.config
0
 
njcuwebsupportAuthor Commented:
no.  It was a fresh install with nothing extra going on.  :-)
0
 
jeremyjared74Commented:
The ./ is my "home" folder name on the FTP server. When I am looking at my files on a server it is html. I don't know what this means if anything.
0
 
njcuwebsupportAuthor Commented:
Hmmm.

Here's some more info, that I am hoping you can explain.

In the index.php file, there's the line...

require('./wp-blog-header.php');

When I change it to  require('wp-blog-header.php');  .. it works fine.  But with the ./ in front of the  wp-blog-header.php  I get a 500 error message.

Even if I put just a   /   in front of the wp-blog-header.php  I get the 500 error.  Even if I use  http://www.greatersba.org/wp-blog-header.php  .. I get the 500 error message.

So, when the code in PHP says  require('./wp-blog-header.php');   (with the   ./)   can you explain exactly what this is doing .. and maybe that might help me better understand what is causing the error message.

Gary

0
 
jeremyjared74Commented:
OK, the ./ is something I will have to look into. The only time I have seen this is when I transfer files form Mac to Windows. The similarity is: my home folder through my FTP is /. (which is the folder name for my directory).

Example: If I put a folder called css_files in the root directory of my server (/.)
The path of the css_files folder would be: /css_files (when viewing the path,( . ) doesn't show up in the path, only the /    I don't really know why this is. The fact that you have to remove the ./ from the path, seems as if the files are "outside" the server root. I don't know how or if this is even possible.

I will continue to research this problem with you. It is helpful for me because while trying to assist someone, I learn without having to experience the situation myself. So if I discover the answer I will post it ASAP.
0
 
jrm213jrm213Commented:
require doesn't use web path's/url's, it's referring to the file system. The only thing I can think is that in the implementation of the require function for windows php, it fails when trying to do ./ or / if you are in the root.


0
 
jeremyjared74Commented:
Hopefully the second request for help you made will bring in some extra help. I have found an article that I think may help. The problem isn't exactly the same as yours, but it sound as if the solution may work. The part I am referring to is the section 3 part of the page.

Link: Rewrite on IIS7
0
 
njcuwebsupportAuthor Commented:
I put a separate request in the PHP for Windows section, and since the issue isn't just related to Wordpress, I figured the separate posting was now more straight to the point.  hahaha  But I will certainly award points in both places.

:-)
Gary
0
 
njcuwebsupportAuthor Commented:
jereymyjared74,

The info on Rewrite on IIS7 isn't the issue.  But .. it was something I did have to deal with in order to get the permalinks to work well.  But this doesn't have anything to do with this issue.  Thanks for the thought.

Gary
0
 
jeremyjared74Commented:
No problem, don't worry about the points. Like I stated it has been a learning process for me, and I haven't been able to solve your problem so I don't deserve them. Thanks though.
0
 
njcuwebsupportAuthor Commented:
Please add this to my other posting, under PHP for Windows and I'll award you the points there as well.  

This fixed me.
0
 
jrm213jrm213Commented:
Hi, could you post for others what setting it was from that post that fixed it for you?
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.