Solved

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

Posted on 2010-08-26
37
304 Views
Last Modified: 2012-05-10
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
0
Comment
Question by:njcuwebsupport
  • 15
  • 14
  • 8
37 Comments
 
LVL 17

Expert Comment

by:jrm213jrm213
ID: 33535065
did you move from a linux, php server to windows or from windows environment to windows environment?
0
 

Author Comment

by:njcuwebsupport
ID: 33535140
windows to window
(But windows 2008 32bit to windows 2008 64bit
0
 
LVL 23

Expert Comment

by:jeremyjared74
ID: 33535198
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
 

Author Comment

by:njcuwebsupport
ID: 33535275
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
 
LVL 17

Expert Comment

by:jrm213jrm213
ID: 33535299
0
 
LVL 23

Expert Comment

by:jeremyjared74
ID: 33535316
That is strange, the Wordpress plug-in directory is down. I will search for a site that explains it.
0
 
LVL 23

Expert Comment

by:jeremyjared74
ID: 33535324
0
 

Author Comment

by:njcuwebsupport
ID: 33535387
I'm confused why you're recommending this to fix the 500 error.  Can you explain?

Thanks.
0
 
LVL 23

Expert Comment

by:jeremyjared74
ID: 33535415
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
 
LVL 23

Expert Comment

by:jeremyjared74
ID: 33535443
Ok forget the 301 re-direct, that would produce a 404 error not 500. Did you back-up your database?
0
 
LVL 23

Expert Comment

by:jeremyjared74
ID: 33535500
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
 

Author Comment

by:njcuwebsupport
ID: 33535632
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
 
LVL 17

Expert Comment

by:jrm213jrm213
ID: 33535686
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
 

Author Comment

by:njcuwebsupport
ID: 33535777
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
 
LVL 23

Expert Comment

by:jeremyjared74
ID: 33535819
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
 

Author Comment

by:njcuwebsupport
ID: 33535884
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
 
LVL 23

Expert Comment

by:jeremyjared74
ID: 33535898
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
 
LVL 23

Expert Comment

by:jeremyjared74
ID: 33535967
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
Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

 

Author Comment

by:njcuwebsupport
ID: 33537981
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
 

Author Comment

by:njcuwebsupport
ID: 33537983
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
 
LVL 23

Expert Comment

by:jeremyjared74
ID: 33538080
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
 

Author Comment

by:njcuwebsupport
ID: 33538207
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
 
LVL 17

Expert Comment

by:jrm213jrm213
ID: 33538375
who is your host?
0
 

Author Comment

by:njcuwebsupport
ID: 33538409
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
 
LVL 17

Expert Comment

by:jrm213jrm213
ID: 33538432
do you have any kind of redirection going on in web.config
0
 

Author Comment

by:njcuwebsupport
ID: 33538469
no.  It was a fresh install with nothing extra going on.  :-)
0
 
LVL 23

Expert Comment

by:jeremyjared74
ID: 33538537
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
 

Author Comment

by:njcuwebsupport
ID: 33542978
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
 
LVL 23

Expert Comment

by:jeremyjared74
ID: 33543179
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
 
LVL 17

Expert Comment

by:jrm213jrm213
ID: 33543208
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
 
LVL 23

Expert Comment

by:jeremyjared74
ID: 33543318
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
 

Author Comment

by:njcuwebsupport
ID: 33544048
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
 

Author Comment

by:njcuwebsupport
ID: 33544088
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
 
LVL 23

Expert Comment

by:jeremyjared74
ID: 33544413
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
 
LVL 17

Accepted Solution

by:
jrm213jrm213 earned 500 total points
ID: 33544566
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
 

Author Closing Comment

by:njcuwebsupport
ID: 33545365
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
 
LVL 17

Expert Comment

by:jrm213jrm213
ID: 33545428
Hi, could you post for others what setting it was from that post that fixed it for you?
0

Featured Post

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Join & Write a Comment

WordPress is constantly evolving, and with each evolution appears to get better and better.  One of the big drawbacks prior to version 3 was that there was no way to be able to set up a custom menu from the backend. The Old Way Adding menus is…
In this article, we will look at our content management system as a whole, to get an idea of how we will start to manage these content items.
The purpose of this video is to demonstrate how to add AdSense Ads to a WordPress Website, and how to set up WordPress to automatically place Ads in Sidebars. This will be demonstrated using a Windows 8 PC. Log into your AdSense account. : Cli…
The purpose of this video is to demonstrate how to Import and export files in WordPress. This will be demonstrated using a Windows 8 PC. Go to your WordPress login page. This will look like the following: mywebsite.com/wp-login.php : Click on Too…

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now