Support » Fixing WordPress » After moving to server, links to pages doesn't work

  • Resolved Meiji


    Hello everyone!

    I have a problem after uploading a client site from localhost (ip) to a Windows Server. Since it’s a windows server, I did it manually:

    1) Created a data base in server
    2) Exported my localhost database from phpmyadmin, and then imported it from server to the data base created
    3) Uploaded WordPress, theme and everything via FTP
    4) Updated links (http://172.132.something.something/net-channel) to real site (

    It partially works, I had to adjust some other stuff again, like placing the header, background and primary menu again. The site shows, I can see the home site, I can see images, etc. Problem is, links to pages and posts doesn’t work and they show 404 error.

    They don’t event work from wp-admin. I mean, all pages and posts appear in admin, but when I click on preview it also shows 404.

    Am I missing something? Any help is gladly appreciated!

    The site:

Viewing 5 replies - 1 through 5 (of 5 total)
  • Meiji


    The step 4 I did it in the data base using this code:

    SELECT * from wp_options where option_value like ‘%172.132.something.something%’;

    And then I manually change them to

    I’ve run into this problem before and resaved the permalinks options and that resolved it.

    Something I’ve done is make a copy of the sql file and then do a find/replace of the url and links before importing.



    Thank you kespinoza! Since my client has it on a Windows Server, the common solutions doesn’t work. But I could find out the solution and I’m posting it here in case someone else has the (unpleasant) chance to work with a Windows Server (first would be advicing the client to migrate to a Linux Server :P).

    Windows Servers use a file called ‘web.config’, so, all I did was create it, like this:

    <?xml version=”1.0″?>
    <remove value=”index.php” />
    <add value=”index.php” />
    <rule name=”Main Rule” stopProcessing=”true”>
    <match url=”.*” />
    <conditions logicalGrouping=”MatchAll”>
    <add input=”{REQUEST_FILENAME}” matchType=”IsFile” negate=”true” />
    <add input=”{REQUEST_FILENAME}” matchType=”IsDirectory” negate=”true” />
    <action type=”Rewrite” url=”index.php/{R:0}” />

    This solves the problem I was having, however, it’s highly adviced to migrate to a Linux Server, since configuration problems with some plugins persist. I’m advicing the client to migrate, hope they agree. 😛


    Thanks Meiji
    actually I have similar problem now, (after uploading DB, WP with Themes ‘n plugins – everything works fine but themes didn’t take any action, it seems like it does not have a CSS file or image folder )
    So, I’m thinking of trying your method but I don’t know where to put that file called “web.config”.
    thanks again

    Hello Everyoen,

    Me too face a similar problem,the images and the plugins does’nt work in my livesite,the site:( have pasted these codes into my phpmyadmin,as a sql query(but does’nt reflect any change).

    UPDATE wp_posts SET post_content = REPLACE (post_content, ‘src=”’, ‘src=”’);

    UPDATE wp_posts SET guid = REPLACE (guid, ‘’, ‘’) WHERE post_type = ‘attachment’;

    (i have replaced the oldsite site url&new site url with mine)
    Also am puzzled what is your cdn here?

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘After moving to server, links to pages doesn't work’ is closed to new replies.