Forum Moderators: coopster

Message Too Old, No Replies

A site to a new domain name

what must be changed on the site - PHP and SQL

         

zeus

2:10 pm on Apr 29, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hello

If I want to make this easy, what must be changed when a site is moved to another domain, still on same server, I have now, just copied the content to the other domain page folder and upload the SQL.

Now I then see old domain links on index page as example, so what must all be changed so the site will function correctly, the site is build over PHP, CSS and SQL on linux system.

RonPK

2:34 pm on Apr 29, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



As far as the PHP code is concerned, I hope you've used $_SERVER['HTTP_HOST'] instead of hard coded domain names. Otherwise, do a global find and replace with your favorite editor. Don't forget mail addresses.

More or less the same goes for JavaScript: location.host is your friend, otherwise search and replace.

CSS doesn't know of variables, so search and replace. However, normally you don't need domain names in a CSS file, unless you're using bakcground images from a different server.