Jump to content

Moving PW to new domain breaks "View" links in the backend

Mike Rockett

Recommended Posts

Greets :)

Right, so I'm nearly done with my first PW site, and now need to move it to a testing server, which uses a different domain. (Sure, this question could apply to moving a site from dev to production too...)

The move was successful, but the "View" tab/button (dependant on the admin theme - hehe) links to the old domain... Didn't realise that the domain would be hard coded into each DB entry... The rest of PW uses a relative approach.

How could I change this? (Or have I done something really silly, which I doubt?)

Link to comment
Share on other sites

Add your new domain name to $config->httpHosts() array in your /site/config.php file. That should do the trick.

Just for the record, it would also work if you cleared that array entirely, but it's better to keep list of valid domains there. It's a security feature.

  • Like 2
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...