Solved

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

Posted on 2011-09-12
14
567 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
  • 5
  • 5
14 Comments
 
LVL 70

Expert Comment

by:Jason C. Levine
Comment Utility
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
Comment Utility
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
Comment Utility
So do as I suggest above.  Set permalinks back to default and then regenerate the custom ones.
0
 
LVL 4

Expert Comment

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

Author Comment

by:Rafi001
Comment Utility
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
6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

 

Author Comment

by:Rafi001
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
While it may not be personally relevant, the instructions to enable rewrites on IIS are accurate and points should be awarded
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Wordpress Horizontal Drop-Down Menu In this tutorial I will show you had to add a WordPress horizontal navigation menu to your theme. I have searched and searched for a good tutorial on creating a WordPress nav menu without adding a plug-in or us…
When it comes to showing a 404 error page to your visitors, you do not want that generic page to show, and you especially do not want your hosting provider’s ad error page to show either. In this article, I will show you how to enable the custom 40…
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…
The purpose of this video is to demonstrate how to set up basic WordPress SEO. This will be demonstrated using a Windows 8 PC. The plugin used will be WordPress SEO by Yoast. Go to your WordPress login page. This will look like the following: myw…

771 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

15 Experts available now in Live!

Get 1:1 Help Now