first post on here so go easy :) got a problem with a wordpress site (custom theme) http://expressduplication.co.uk which was built a few years ago by a company we are no longer able to get in touch with.

It was running an old version of wordpress 2.x.x (can't remember the exact version) and I have today updated to version 4.5.2.

Now whenever I click one of the links in the sub menu in the nav bar eg. Products > Special Offers, I receive a page cannot be found error and in the URL it is showing:


When it is supposed to be expressduplication.co.uk/special-offers

This works fine when inputted manually, just not through the links.

I notice "SITE_HOME_URL" getting inserted into links all over the site therefore breaking them, "THEME_PATH" is also getting inserted into links for some images therefore breaking them too. It seems like some request isn't being answered as it was in the old version of wordpress.

I have average experience and skills with Wordpress but this one has me beat.

Thanks for the help in advance :)


  • Does the error go away if you change themes?
    – Pat J
    May 14, 2016 at 21:32
  • No its the same on all themes which is concerning me. Jamie May 15, 2016 at 12:39

1 Answer 1


Search the theme source-code for SITE_HOME_URL and try replacing it with WP_HOME or with the result of esc_url(home_url()). Locate THEME_PATH and replace it with the result of get_theme_root().

EDIT: In the case of expressduplication.co.uk/SITE_HOME_URLspecial-offers there is probably a wp_redirect() or wp_safe_redirect() that doesnt work because of the undefined constant SITE_HOME_URL.

  • Thank you, just doing a backup and I will try this. Jamie May 15, 2016 at 12:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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