i'm new to wordpress AND to php and web coding in general.

i've done my wordpress theme in local, and now i like it. then i moved to a host, created the user and the database in the host server, changed wp-config.php and replace all "http://localhost/wordpress" with "http://my-new-cool-host.org/blog" in wordpress.sql (dump of all db with phpmyadmin).

everything seems right: if i open http://my-new-cool-host.org/blog there is my theme, if i click on the title (that i have linked to wordpress instance home with this code:

    <title><?php bloginfo('name'); ?><?php wp_title(); ?></title>

) it link me on http://my-new-cool-host.org/blog and if i click on a post it link me on the post.

BUT: after entered on a post, if i click on one of the links.. it has this ahref:

<a href="../../wordpress.1">

why that? why after seeing a post all links seem broken?


after some trials i realized that if i use as permalinks the 'Default' options everything was ok (well.. everything, only the posts, because the pages are broken again) but if i use the options 'Post names' the wordpress.1 error appears again.. some hints?

  • 2
    How exactly did you replace the old URL with the new one in your SQL dump? – fuxia Jul 5 '12 at 18:50
  • 1
    I always opt for something like Deploy Helper over a standard SQL find/replace (it'll handle serialized data too). – TheDeadMedic Jul 5 '12 at 19:26
  • i replaced wirh replace command in gedit – nkint Jul 6 '12 at 10:12
  • @TheDeadMedic it say me that it has done 0 fixes – nkint Jul 6 '12 at 10:17
  • Well it will do if you've already replaced the URL manually - run the plugin under your localhost copy, then export the local db & import it to your live one. – TheDeadMedic Jul 6 '12 at 11:12

Have you tried going to Settings->Permalinks and hitting 'Save'? You don't even need to change anything, but I'm pretty sure it refresh's WordPress' .htaccess file.

  • i've just tried but no changes.. – nkint Jul 6 '12 at 10:17
  • Assuming you made a backup of your DB before you went through and changed all the links, 1. Backup what you've currently done. (Post link change) 2. Install the plugin WordPress Move and follow the instructions (you have to know the FTP uname and password for your account, and you have to install it on both the local domain and live domain.) Unfortunately you can't just change the links. This'll be easier if you backed up your DB first – Jonathan Jul 6 '12 at 12:48
  • yeah of course i've done backup thank i'll give it a try, let you know – nkint Jul 6 '12 at 13:06
  • edited question: the problems are permalinks! – nkint Jul 6 '12 at 13:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.