I want to do developments on my client's website but by making a clone of it. So, main website url is: http://website.com
and the clone i am trying to create is: http://test.website.com
.
So far i've done the following:
- copied entire root directory into
public_html/test
dir (with folders config,field,FirePHPCore,fontyourface,includes,js,misc,modules,scripts,sites,styles and themes) - created a subdomain in cPanel for
test.website.com
- checked the file
settings.php
(insidesites/default
folder) for$base_url
but found it commented, so left it as it is unchanged. - copied db via phpMyAdmin and updated the new db details in
settings.php
(insidesites/default
folder). - inside the table
variable
, two rows with the namesecurepages_basepath
andsecurepages_basepath_ssl
. Changed their values fromhttp://website.com
tohttp://test.website.com
(using thevariable_get
andvariable_set
functions).
Now i can access http://test.website.com
but when i click on login (from header) it takes me to http://website.com/user
and if manually type http://test.website.com/user
and login then it takes me to http://website.com/users/admin
then i have to manually type in correct address http://test.website.com/users/admin
.
And when i logout, it again takes me back to http://website.com
.
So i want to know how can i completely make it to work on http://test.website.com
?
Are there more variables to change?
And how i can make 100% sure that the test site is only using test and not the live site. I am afraid of messing up live website.
Please advice, thanks!