Solved

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

Posted on 2011-09-12
14
573 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
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
VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

 
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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

Debug Tools to analyse IIS process: This article focus on taking memory dumps from IIS to determine which code is taking more time and to analyse which calls hangs/causes more CPU usage. To take dumps,download the following. Install1: To st…
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…
The purpose of this video is to demonstrate how to automatically show related posts at the bottom of a blog post in WordPress. This will be demonstrated using a Windows 8 PC. Plugin “Yet Another Related Posts Plugin” will be used. Go to your…
The purpose of this video is to demonstrate how to Test the speed of a WordPress Website. Site Speed is an important metric of a site’s health. Slow site speed can result in viewers leaving your site quickly and not seeing your content. This…

813 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

17 Experts available now in Live!

Get 1:1 Help Now