views:

28

answers:

3

Hi all,

Here's what I wanted to dot, what I've done, and... the (poor) result:

  • I wanted to: migrate my personal Website from one server to another one, and only change the IP on my DNS. So:
  • I changed the IP on my DNS. Ok. Everything's fine (it's been 7 days now)
  • I dump my Wordpress 3.0.1 database from server A
  • I copied recursively the full directory of my personal Website to the server B
  • on server B: I've created my utf8 wordpress database then re-injected the SQL dump (from A)
  • I've created the good user with the right permissions on the database B

And now: Everything works fine... Well Err... only the main page! See http://olivierpons.fr/ then click on a topic. I can't even log in! Do you know where I should look or what I am missing?

Thanks a lot!

Olivier

A: 

Check if you included the .htaccess file. It's easy to forget those "hidden" files

windyjonas
I did it (first thing I checked actually)
Olivier Pons
A: 

Has your domain name changed? Your articles seem to link to oliverpons.com, rather than oliverpons.fr. If you've changed the domain name, you'll probably want to change the "siteurl" and "home" values in the wp_options table. See this Codex article for more info. Also, as windyjonas says, check your .htaccess.

Bear in mind that this isn't really a programming-related question; you may be better off asking in other places.

Matt Gibson
I own both of them and both of them point to 83.145.112.92 (the good server) so this shouldn't be a problem (it used to work like this on the first server). And for the question I thought it *may* be a programming question (maybe I should check how I dumped, or modify some SQL or whatever). I'm sorry I thought this was the right place, thanks for the link.
Olivier Pons
@Olivier Hey, it might turn out to be programming-related in the end; as you can see from that meta answer, WordPress questions can be a bit fuzzy, especially if you don't know what the actual problem is! What _are_ the values in siteurl and home? Also, did you change your wp-config with any necessary updates to point to the correct database host/database? Bear in mind that with some hosts, the database server isn't the same as the web server, so "localhost" doesn't always work.
Matt Gibson
This is *my* host with *my* IPs, there can't be problems with that... as for wp-config, no, I didn't changed, on the contrary: I created the right user with the right permissions on the right database and I manually checked that login was ok "mysql DBNAME -u USERNAME -pPASSWORD -h HOST" => login ok => test SQL like "select * from wp_users;" => ok... I'm stuck :'( Moreover the base page (=index) accesses perfectly to the database, because you can see the "headers" of my posts...I'm definitely stuck :'(
Olivier Pons
...though it does look like your database is there. Hmm. It definitely seems to be some confusion with the site name; I'd expect WordPress to redirect and present URLs consistently, whereas the site redirects to olivierpons.fr, but outputs olivierpons.com URLs. .htaccess, the DNS settings, the siteurl and home values, and maybe the permalink structure are all worth checking -- can you see those values in the old system, or grab them from the database dump, if you can't get into the new server admin interface?
Matt Gibson
"select * from wp_options where option_name='permalink_structure';" | moreoption_id blog_id option_name option_value autoload32 0 permalink_structure /%year%/%monthnum%/%day%/%postname%/ yes
Olivier Pons
Sorry, have I missed what's in your "siteurl" and "home" in wp_options? Also, do you have any plugins which might be affecting this? May be worth nuking them (`UPDATE wp_options SET option_value = '' WHERE option_name = 'active_plugins';`) and seeing if anything changes. Beyond that, I'm not sure what else to suggest...
Matt Gibson
Ok I tried what you said and still nothing works. So I've created a new database, and I'll try to import my old articles. Hope this will work....
Olivier Pons
Good luck! Should work fine, if you've got a working site then the import can't really break anything, and it generally works extremely well.
Matt Gibson
It worked. It took me 2 days to correct it. Here's the result: I've lost my #1 place on google (I was #1 / line #1 for "olivier pons" on google) and I've lost more than 500 visitors/day (I was #1 / line #1 if you were looking for "scp linux" on google). It's very hard to stay calm on situations like this....
Olivier Pons
A: 

Okay I still don't know where the problem was, but here's what I did:

  • I exported all the articles from my old webserver A into a file XML_A
  • I created manually a new database on B
  • I launched Wordpress on B
  • I created all what's needed on B,
  • I imported all from the file XML_A

It works now but I'm pretty convinced this is not the right way to do this...

And I finally found the right answer an the right place (in case this might help someone):

http://codex.wordpress.org/Moving_WordPress

Olivier Pons