WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have just copied a WordPress site to a different domain, everything on the front-end and admin side displays and works smoothly except I found my category links are linking to the old site domain. ( when echoed from get_category_link($parent->cat_ID) )

The siteurl and home fields in the database are correct (http://subdomain.newdomain.com)

However when I echo any of home_url() site_url() or network_site_url() I get http://www.oldsite.com

I've tried setting it in both the functions.php file and wp-config.php files, and have checked and re-checked the database field, even switching it away, breaking the site, switching it back to have the same results.

What is going on?

share|improve this question

Looks like the previous developer had defined the site and home URLs in the main wp index.php file.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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