views:

35

answers:

3

I just imported my Wordpress database from a localhost installation on my computer to the online server. However, all the links still point to localhost instead of the server's url.

Is there something extra I forgot to do?

(Note: I did not hard write my links so for example the navigation which still points to localhost is generated with this code:

<?php wp_list_pages('sort_column=menu_order&depth=1&title_li='); ?>

An other example is when I type the in url and type "wp-admin/" after it to access the dashboard, it redirects me to the localhost dashboard page....really weird

A: 

There are some values in the table wp_options that are URLs pointing to your site, and they need to be updated. To see which ones, do

select * from wp_options where option_value like 'http://%';

In my installation they are the rows where option_name is siteurl or home.

Jesse Dhillon
+2  A: 

You need to go to the wp_options table of your database (assuming wp_ is your WordPress table prefix) and change the values of the fields with these option names, to reflect the location of your online server:

  • siteurl
  • home
BoltClock
Thanks a lot! It fixed the problem. Your my hero! :D
codedude
+2  A: 

You possibly need to fix your configuration file.

http://codex.wordpress.org/Changing_The_Site_URL

hollsk