开发者

Wordpress Database Import

I just imported my Wordpress database from a localhost installation on my开发者_JS百科 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


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


You possibly need to fix your configuration file.

http://codex.wordpress.org/Changing_The_Site_URL


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜