Solved

Wordpress site links not working for any page after moving it from one server to another.

Posted on 2011-09-12
14
591 Views
Last Modified: 2012-06-27
Hello Experts,

I have been given mysql backup and a wordpress site from another place to host somewhere else. I am new to wordpress, I am trying to host it on a local win 2003 machine, IIS 6.0 to check if everything works fine before we can move it to a hosting provider.
After fighting with PHP and mysql installation and making them work. I finally was able to import the database in sql and put the files given to me in a directory on IIS to be hosted. I changed the wp-config.php to include new username and password for Mysql database. the site also has Theme test drive plugin so that nobody can view the site without logging into wp-admin.php.
Now problem is that i can login into the dashboard of the wordpress (wp-admin.php). then i can view the main page of the site but none of the links are working. I can login into the dashboard and then i can see the pages there i can click to edit them but when i press view from dashboard, IE 404 error , page cannot be found shows up. I cant figure out what would be the reason for this and is driving me crazy. Please help me with this as i need to sort this ut asap.
Many thanks.
0
Comment
Question by:Rafi001
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 5
14 Comments
 
LVL 70

Expert Comment

by:Jason C. Levine
ID: 36523885
Assuming you have the same domain name as before, you should disable your permalinks (set to default), save, then recreate them.

If you changed the domain name or path, you probably need to download the WordPress Find and Replace plugin (http://wordpress.org/extend/plugins/search-and-replace/) and use it to change the URLs in your database.
0
 

Author Comment

by:Rafi001
ID: 36524471
Jason118, thanks for your response. The domain name is same. The permalinks were set as custom: /%postname%, which i didnt change.
which path you are talking about and how can i check if that has been changed?

thanks Rafi
0
 
LVL 70

Expert Comment

by:Jason C. Levine
ID: 36524502
So do as I suggest above.  Set permalinks back to default and then regenerate the custom ones.
0
The Ultimate Checklist to Optimize Your Website

Websites are getting bigger and complicated by the day. Video, images, custom fonts are all great for showcasing your product/service. But the price to pay in terms of reduced page load times and ultimately, decreased sales, can lead to some difficult decisions about what to cut.

 
LVL 4

Expert Comment

by:vaibhavjaiman
ID: 36527634
It can also arises if you are using any URL rewrite ,which is not present in new server.
0
 

Author Comment

by:Rafi001
ID: 36528272
Jason118,  i hve tried changing the permalinks to default and then back to custom /%postname%, mas it was but this doesnt work. Not sure this is what you meant? any suggestions
vaibhavjaiman, How can i check the URL rewrite and how can i install this in new server, it is running on IIS 6.0?

Thanks
Rafi
0
 

Author Comment

by:Rafi001
ID: 36529839
I have found out that when i changed the permalinks to default then it is working on view within dashboard of the site. However, on the main page the links are still the same. see examples below,

After changing the permalinks to default, the link to about us page is http://mydomain.com/?page_id=2 
which is working fine.

However, on the main page the link to about us is still http://mydomain.com/about, which is not working. This link was showing up for about us page from within the dashboard before changing the permalinks.

Please note that there is custom made theme being used on this website.
Can this help experts narrowiing down the problem. Please comment..

Regards,
Rafi
0
 
LVL 70

Expert Comment

by:Jason C. Levine
ID: 36530479
Okay, if it works with default links then you need to enable URL Rewrites on IIS

http://learn.iis.net/page.aspx/466/enabling-pretty-permalinks-in-wordpress/
0
 

Author Comment

by:Rafi001
ID: 36539147
Hi Jason1178, This is for IIS7. Do you know any resource for URL Rewrites for IIS6 Please.

Thanks
0
 
LVL 70

Accepted Solution

by:
Jason C. Levine earned 500 total points
ID: 36539176
http://codex.wordpress.org/Using_Permalinks#Permalinks_without_mod_rewrite

You might have to update all links to use /index.php/%permalinkcodes%/ structure on IIS 6

0
 

Author Comment

by:Rafi001
ID: 37054191
I've requested that this question be deleted for the following reason:

This is irelevant for me as i have not doing this job anymore.<br /><br />Thanks for all comments
0
 
LVL 70

Expert Comment

by:Jason C. Levine
ID: 37054192
While it may not be personally relevant, the instructions to enable rewrites on IIS are accurate and points should be awarded
0

Featured Post

The Ultimate Checklist to Optimize Your Website

Websites are getting bigger and complicated by the day. Video, images, custom fonts are all great for showcasing your product/service. But the price to pay in terms of reduced page load times and ultimately, decreased sales, can lead to some difficult decisions about what to cut.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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…
This article shows the steps required to install WordPress on Azure. Web Apps, Mobile Apps, API Apps, or Functions, in Azure all these run in an App Service plan. WordPress is no exception and requires an App Service Plan and Database to install
The purpose of this video is to demonstrate how to insert an Iframe into 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 : Open Page or Post…
The purpose of this video is to demonstrate how to prevent comment spam on a WordPress Website. This will be demonstrated using a Windows 8 PC. Plugin Akismet will be used. Go to your WordPress login page. This will look like the following: myw…

718 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